Lines Matching defs:path

11 import os.path
43 STDLIB_INSTALL = os.path.join(sys.prefix, sys.platlibdir,
45 if not os.path.isfile(os.path.join(STDLIB_INSTALL, 'os.py')):
49 program = os.path.basename(program)
50 name = os.path.splitext(program)[0]
66 builddir = os.path.dirname(sys.executable)
72 exepath = os.path.join(builddir, 'Programs')
73 self.test_exe = exe = os.path.join(exepath, exename)
74 if not os.path.exists(exe):
266 env = dict(os.environ, PYTHONPATH=os.pathsep.join(sys.path))
271 expected_path = os.path.join(os.getcwd(), "spam")
282 env['PYTHONPATH'] = os.pathsep.join(sys.path)
671 default_executable = os.path.abspath(expected['program_name'])
673 default_executable = os.path.join(os.getcwd(), '_testembed')
689 paths = pythonpath_env.split(os.path.pathsep)
907 'pythonpath_env': '/my/path',
938 'pythonpath_env': '/my/path',
992 'run_filename': os.path.abspath('script.py'),
1071 'path calculations do not occur on read')
1078 def modify_path(path):
1079 path.insert(1, "test_path_insert1")
1080 path.append("test_path_append")
1190 env = {'TESTPATH': os.path.pathsep.join(paths)}
1217 env = {'TESTPATH': os.path.pathsep.join(paths)}
1232 os.path.join(prefix, sys.platlibdir,
1234 os.path.join(prefix, sys.platlibdir,
1236 os.path.join(exec_prefix, sys.platlibdir,
1247 tmpdir = os.path.realpath(tmpdir)
1249 tmpdir = os.path.normpath(os.path.join(tmpdir, subdir))
1255 exedir = os.path.dirname(self.test_exe)
1258 shutil.copyfile(os.path.join(exedir, f), os.path.join(tmpdir, f))
1261 exec_copy = os.path.join(tmpdir, os.path.basename(self.test_exe))
1272 paths_str = os.path.pathsep.join(paths)
1274 for path in paths:
1275 if not os.path.isdir(path):
1277 if os.path.exists(os.path.join(path, 'os.py')):
1278 home = os.path.dirname(path)
1285 stdlib = os.path.join(home, "Lib")
1288 expected_paths = [paths[0], os.path.join(home, 'DLLs'), stdlib]
1291 stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
1313 paths_str = os.path.pathsep.join(paths)
1315 for path in paths:
1316 if not os.path.isdir(path):
1318 if os.path.exists(os.path.join(path, 'os.py')):
1319 home = os.path.dirname(path)
1326 stdlib = os.path.join(home, "Lib")
1329 expected_paths = [paths[0], os.path.join(home, 'DLLs'), stdlib]
1332 stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
1355 exedir = os.path.dirname(sys.executable)
1356 with open(os.path.join(exedir, 'pybuilddir.txt'), encoding='utf8') as f:
1357 expected_paths[1 if MS_WINDOWS else 2] = os.path.normpath(
1358 os.path.join(exedir, f'{f.read()}\n$'.splitlines()[0]))
1372 paths_str = os.path.pathsep.join(paths)
1379 # Test path configuration with pybuilddir.txt configuration file
1386 libdir = os.path.join(tmpdir, subdir)
1388 stdlibdir = os.path.normpath(os.path.join(tmpdir, vpath, 'Lib'))
1391 filename = os.path.join(tmpdir, 'pybuilddir.txt')
1415 # Test path configuration with pybuilddir.txt configuration file
1419 if os.path.normpath(vpath).count(os.sep) == 2:
1420 subdir = os.path.join(subdir, 'instrumented')
1424 prefix = os.path.normpath(os.path.join(tmpdir, vpath))
1426 stdlibdir = os.path.normpath(os.path.join(tmpdir, vpath, 'Lib'))
1428 filename = os.path.join(tmpdir, 'pybuilddir.txt')
1433 module_search_paths[-3] = os.path.join(tmpdir, os.path.basename(module_search_paths[-3]))
1454 # Test path configuration with pyvenv.cfg configuration file
1461 lib_dynload = os.path.join(pyvenv_home,
1467 lib_folder = os.path.join(pyvenv_home, 'Lib')
1471 os.path.join(support.STDLIB_DIR, 'os.py'),
1472 os.path.join(lib_folder, 'os.py'),
1475 filename = os.path.join(tmpdir, 'pyvenv.cfg')
1485 os.path.join(tmpdir, os.path.basename(paths[0])),
1487 os.path.join(pyvenv_home, "Lib"),
1491 base_executable = os.path.join(pyvenv_home, os.path.basename(executable))
1504 config['stdlib_dir'] = os.path.join(pyvenv_home, 'Lib')
1519 # Check _Py_abspath() is passed a backslashed path not to fall back to
1520 # GetFullPathNameW() on startup, which (re-)normalizes the path overly.
1533 "PYTHONPATH": os.path.pathsep.join(c[0] for c in CASES)}
1546 # Test C API functions getting the path configuration:
1555 # The global path configuration (_Py_path_config) must be a copy
1556 # of the path configuration of PyInterpreter.config (PyConfig).
1575 self.assertEqual(Py_GetPath().split(os.path.pathsep),
1685 startup = os.path.join(self.oldcwd, os_helper.TESTFN) + ".py"
1698 startup = os.path.join(self.oldcwd, os_helper.TESTFN) + ".py"
1731 executable = os.path.realpath('./argv0')