Lines Matching refs:path

11 import os.path
63 self.env_dir = os.path.realpath(tempfile.mkdtemp())
73 self.exe = os.path.split(executable)[-1]
75 and os.path.lexists(executable)
76 and not os.path.exists(executable)):
91 return os.path.join(self.env_dir, *args)
103 self.assertTrue(os.path.isdir(fn))
107 Test the create function with default arguments and a str path.
115 Test the create function with default arguments and a pathlib.Path path.
130 self.assertTrue(os.path.islink(p))
132 self.assertFalse(os.path.exists(p))
135 path = os.path.dirname(executable)
136 self.assertIn('home = %s' % path, data)
138 os.path.realpath(sys.executable), data)
143 if not os.path.exists(fn): # diagnostics for Windows buildbot failures
147 self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
181 env_name = os.path.split(self.env_dir)[1]
201 cwd = os.path.basename(os.getcwd())
211 python_exe = os.path.split(sys.executable)[1]
213 expect_exe = os.path.normcase(
214 os.path.join(fake_env_dir, bin_path, python_exe)
217 expect_exe = os.path.normcase(os.path.realpath(expect_exe))
220 cmd[0] = os.path.normcase(cmd[0])
246 envpy = os.path.join(self.env_dir, self.bindir, self.exe)
264 envpy = os.path.join(self.env_dir, self.bindir, self.exe)
287 envpy = os.path.join(self.env_dir, self.bindir, self.exe)
324 d = os.path.join(self.env_dir, *subdirs)
326 fn = os.path.join(d, filename)
337 fn = os.path.join(self.env_dir, *(subdirs + ('foo',)))
338 self.assertTrue(os.path.exists(fn))
345 fn = os.path.join(self.env_dir, *(subdirs + ('foo',)))
346 self.assertFalse(os.path.exists(fn))
348 def clear_directory(self, path):
349 for fn in os.listdir(path):
350 fn = os.path.join(path, fn)
351 if os.path.islink(fn) or os.path.isfile(fn):
353 elif os.path.isdir(fn):
359 fn = os.path.join(self.env_dir, *paths)
379 if not os.path.exists(fn):
384 self.assertTrue(os.path.exists(fn), 'File %r should exist.' % fn)
412 self.assertFalse(os.path.islink(fn))
414 self.assertTrue(os.path.islink(fn))
427 envpy = os.path.join(os.path.realpath(self.env_dir),
441 envpy = os.path.join(os.path.realpath(self.env_dir),
453 env_dir = os.path.join(os.path.realpath(self.env_dir), 'ϼўТλФЙ')
456 activate = os.path.join(env_dir, self.bindir, 'activate.bat')
457 envpy = os.path.join(env_dir, self.bindir, self.exe)
476 envpy = os.path.join(os.path.realpath(self.env_dir),
494 envpy = os.path.join(os.path.realpath(self.env_dir),
496 script = os.path.join(TEST_HOME_DIR, '_test_venv_multiprocessing.py')
507 activate = os.path.join(self.env_dir, self.bindir, "activate")
508 test_script = os.path.join(self.env_dir, "test_strict.sh")
524 envpy = os.path.join(os.path.realpath(self.env_dir),
533 the path separator.
544 Test that when create venv from non-installed python, the zip path
551 non_installed_dir = os.path.realpath(tempfile.mkdtemp())
553 bindir = os.path.join(non_installed_dir, self.bindir)
556 libdir = os.path.join(non_installed_dir, platlibdir, self.lib[1])
558 landmark = os.path.join(libdir, "os.py")
560 zip_landmark = os.path.join(non_installed_dir,
566 for eachpath in sys.path:
568 if os.path.isfile(eachpath):
571 os.path.join(non_installed_dir, platlibdir))
572 elif os.path.isfile(os.path.join(eachpath, "os.py")):
576 fn = os.path.join(eachpath, name)
577 if os.path.isfile(fn):
579 elif os.path.isdir(fn):
580 shutil.copytree(fn, os.path.join(libdir, name))
584 cmd = [os.path.join(non_installed_dir, self.bindir, self.exe),
599 ld_library_path = os.path.abspath(os.path.dirname(sys.executable))
607 envpy = os.path.join(self.env_dir, self.bindir, self.exe)
609 # correct zip path in pythonpath.
610 cmd = [envpy, '-S', '-c', 'import sys; print(sys.path)']
618 envpy = os.path.join(os.path.realpath(self.env_dir),
648 self.assertTrue(os.path.exists(os.devnull))
674 dirpath = os.path.join(home_dir, dirname)
676 fpath = os.path.join(dirpath, fname)
687 envpy = os.path.join(os.path.realpath(self.env_dir), self.bindir, self.exe)