Lines Matching refs:path
10 import os.path
51 import os.path
55 expected_spec_name = os.path.splitext(os.path.basename(__file__))[0]
74 print('sys.path[0]==%a' % sys.path[0])
105 printed_path0 = 'sys.path[0]==%a' % expected_path0
119 # PYTHONSAFEPATH=1 changes the default sys.path[0]
162 # interactive REPL, since that code path only gets executed when
229 # pass the script using the relative path, expect the absolute path
232 self.assertTrue(os.path.isabs(script_dir), script_dir)
235 relative_name = os.path.basename(script_name)
318 pkg_dir = os.path.join(script_dir, 'test_pkg')
343 pkg_dir = os.path.join(script_dir, 'test_pkg')
353 pkg_dir = os.path.join(script_dir, 'test_pkg')
366 pkg_dir = os.path.join(script_dir, 'test_pkg')
374 pkg_dir = os.path.join(script_dir, 'test_pkg')
376 main_dir = os.path.join(pkg_dir, '__main__')
387 with os_helper.change_cwd(path=script_dir):
388 pkg_dir = os.path.join(script_dir, 'test_pkg')
402 # does not alter the value of sys.path[0]
404 with os_helper.change_cwd(path=script_dir):
408 'import sys; print("sys.path[0]==%r" % sys.path[0])',
412 expected = "sys.path[0]==%r" % ''
417 # does not alter the value of sys.path[0]
420 with os_helper.change_cwd(path=script_dir):
433 script_name = os.path.join(script_dir, "issue20884.py")
441 with os_helper.change_cwd(path=script_dir):
449 os_helper.change_cwd(path=script_dir):
450 pkg_dir = os.path.join(script_dir, 'test_pkg')
493 os_helper.change_cwd(path=script_dir):
507 os_helper.change_cwd(path=script_dir):
687 # sys.path configuration:
694 for entry in sys.path:
697 # Always show full path diffs on errors
718 # sys.path configuration:
726 for entry in sys.path:
729 # Always show full path diffs on errors
732 script_dir = os.path.join(work_dir, "script_pkg")
759 self.assertFalse(os.path.exists(script))
768 @unittest.skipUnless(os.path.exists('/dev/fd/0'), 'requires /dev/fd platform')