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 @@ -767,17 +767,25 @@ def recursive_function(depth):
767
767
#self.assertEqual(available, 2)
768
768
769
769
def test_copy_python_src_ignore (self ):
770
+ # Get source directory
770
771
src_dir = sysconfig .get_config_var ('abs_srcdir' )
771
772
if not src_dir :
772
773
src_dir = sysconfig .get_config_var ('srcdir' )
773
774
src_dir = os .path .abspath (src_dir )
775
+
776
+ # Check that the source code is available
774
777
if not os .path .exists (src_dir ):
775
778
self .skipTest (f"cannot access Python source code directory:"
776
779
f" { src_dir !r} " )
780
+ landmark = os .path .join (src_dir , 'Lib' , 'os.py' )
781
+ if not os .path .exists (landmark ):
782
+ self .skipTest (f"cannot access Python source code directory:"
783
+ f" { landmark !r} landmark is missing" )
777
784
778
- ignored = { '.git' , '__pycache__' }
785
+ # Test support.copy_python_src_ignore()
779
786
780
787
# Source code directory
788
+ ignored = {'.git' , '__pycache__' }
781
789
names = os .listdir (src_dir )
782
790
self .assertEqual (support .copy_python_src_ignore (src_dir , names ),
783
791
ignored | {'build' })
You can’t perform that action at this time.
0 commit comments