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 @@ -767,17 +767,25 @@ def recursive_function(depth):
767767 #self.assertEqual(available, 2)
768768
769769 def test_copy_python_src_ignore (self ):
770+ # Get source directory
770771 src_dir = sysconfig .get_config_var ('abs_srcdir' )
771772 if not src_dir :
772773 src_dir = sysconfig .get_config_var ('srcdir' )
773774 src_dir = os .path .abspath (src_dir )
775+
776+ # Check that the source code is available
774777 if not os .path .exists (src_dir ):
775778 self .skipTest (f"cannot access Python source code directory:"
776779 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" )
777784
778- ignored = { '.git' , '__pycache__' }
785+ # Test support.copy_python_src_ignore()
779786
780787 # Source code directory
788+ ignored = {'.git' , '__pycache__' }
781789 names = os .listdir (src_dir )
782790 self .assertEqual (support .copy_python_src_ignore (src_dir , names ),
783791 ignored | {'build' })
You can’t perform that action at this time.
0 commit comments