File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -802,17 +802,25 @@ def test_set_memlimit(self):
802802            support .real_max_memuse  =  old_real_max_memuse 
803803
804804    def  test_copy_python_src_ignore (self ):
805+         # Get source directory 
805806        src_dir  =  sysconfig .get_config_var ('abs_srcdir' )
806807        if  not  src_dir :
807808            src_dir  =  sysconfig .get_config_var ('srcdir' )
808809        src_dir  =  os .path .abspath (src_dir )
810+ 
811+         # Check that the source code is available 
809812        if  not  os .path .exists (src_dir ):
810813            self .skipTest (f"cannot access Python source code directory:" 
811814                          f" { src_dir !r}  )
815+         landmark  =  os .path .join (src_dir , 'Lib' , 'os.py' )
816+         if  not  os .path .exists (landmark ):
817+             self .skipTest (f"cannot access Python source code directory:" 
818+                           f" { landmark !r}  )
812819
813-         ignored   =  { '.git' ,  '__pycache__' } 
820+         # Test support.copy_python_src_ignore() 
814821
815822        # Source code directory 
823+         ignored  =  {'.git' , '__pycache__' }
816824        names  =  os .listdir (src_dir )
817825        self .assertEqual (support .copy_python_src_ignore (src_dir , names ),
818826                         ignored  |  {'build' })
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments