File tree 1 file changed +9
-1
lines changed
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):
802
802
support .real_max_memuse = old_real_max_memuse
803
803
804
804
def test_copy_python_src_ignore (self ):
805
+ # Get source directory
805
806
src_dir = sysconfig .get_config_var ('abs_srcdir' )
806
807
if not src_dir :
807
808
src_dir = sysconfig .get_config_var ('srcdir' )
808
809
src_dir = os .path .abspath (src_dir )
810
+
811
+ # Check that the source code is available
809
812
if not os .path .exists (src_dir ):
810
813
self .skipTest (f"cannot access Python source code directory:"
811
814
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} landmark is missing" )
812
819
813
- ignored = { '.git' , '__pycache__' }
820
+ # Test support.copy_python_src_ignore()
814
821
815
822
# Source code directory
823
+ ignored = {'.git' , '__pycache__' }
816
824
names = os .listdir (src_dir )
817
825
self .assertEqual (support .copy_python_src_ignore (src_dir , names ),
818
826
ignored | {'build' })
You can’t perform that action at this time.
0 commit comments