/third_party/python/Lib/test/ |
H A D | test_pdb.py | 17 from test.support import os_helper namespace 1705 os_helper.unlink(os_helper.TESTFN) 1710 self.addCleanup(os_helper.rmtree, '__pycache__') 1734 self.addCleanup(os_helper.unlink, filename) 1740 os_helper.rmtree(self.module_name) 1748 self.addCleanup(os_helper.rmtree, self.module_name) 1752 with open(os_helper.TESTFN, 'wb') as f: 1756 expected[0], os_helper.TESTFN, expected[1]) 1758 expected, pdb.find_function(func_name, os_helper [all...] |
H A D | test_marshal.py | 2 from test.support import os_helper, requires_debug_ranges namespace 23 with open(os_helper.TESTFN, "wb") as f: 25 with open(os_helper.TESTFN, "rb") as f: 29 os_helper.unlink(os_helper.TESTFN) 147 with open(os_helper.TESTFN, 'wb') as f: 151 '-c', code, os_helper.TESTFN) 153 os_helper.unlink(os_helper.TESTFN) 313 with open(os_helper [all...] |
H A D | test_cmd_line_script.py | 18 from test.support import os_helper namespace 221 with os_helper.temp_dir() as script_dir: 231 with os_helper.temp_cwd() as script_dir: 241 with os_helper.temp_dir() as script_dir: 251 with os_helper.temp_dir() as script_dir: 258 with os_helper.temp_dir() as script_dir: 268 with os_helper.temp_dir() as script_dir: 273 with os_helper.temp_dir() as script_dir: 280 with os_helper.temp_dir() as script_dir: 290 with os_helper [all...] |
H A D | test_posixpath.py | 8 from test.support import os_helper namespace 9 from test.support.os_helper import FakePath 21 ABSTFN = abspath(os_helper.TESTFN) 46 os_helper.unlink(os_helper.TESTFN + suffix) 47 safe_rmdir(os_helper.TESTFN + suffix) 158 self.assertIs(posixpath.islink(os_helper.TESTFN + "1"), False) 159 self.assertIs(posixpath.lexists(os_helper.TESTFN + "2"), False) 161 with open(os_helper.TESTFN + "1", "wb") as f: 163 self.assertIs(posixpath.islink(os_helper [all...] |
H A D | test_genericpath.py | 11 from test.support import os_helper namespace 14 from test.support.os_helper import FakePath 102 filename = os_helper.TESTFN 103 self.addCleanup(os_helper.unlink, filename) 113 filename = os_helper.TESTFN 114 self.addCleanup(os_helper.unlink, filename) 131 filename = os_helper.TESTFN 133 self.addCleanup(os_helper.unlink, filename) 169 filename = os_helper.TESTFN 184 os_helper [all...] |
H A D | test_ntpath.py | 7 from test.support import os_helper namespace 9 from test.support.os_helper import FakePath 312 @os_helper.skip_unless_symlink 315 ABSTFN = ntpath.abspath(os_helper.TESTFN) 317 self.addCleanup(os_helper.unlink, ABSTFN) 318 self.addCleanup(os_helper.unlink, ABSTFN + "1") 337 ntpath.realpath(os_helper.TESTFN + "\0spam", strict=False)) 339 @os_helper.skip_unless_symlink 344 ABSTFN = ntpath.abspath(os_helper.TESTFN) 346 self.addCleanup(os_helper [all...] |
H A D | test_posix.py | 5 from test.support import os_helper namespace 31 os_helper.TESTFN + '-dummy-symlink') 56 self.addCleanup(os_helper.unlink, os_helper.TESTFN) 57 with open(os_helper.TESTFN, "wb"): 163 fp = open(os_helper.TESTFN) 173 fp = open(os_helper.TESTFN, 'w+') 184 with open(os_helper.TESTFN, 'w') as fp: 187 posix.truncate(os_helper.TESTFN, 0) 278 fd = os.open(os_helper [all...] |
H A D | test_bufio.py | 3 from test.support import os_helper namespace 21 os_helper.unlink(os_helper.TESTFN) 25 f = self.open(os_helper.TESTFN, "wb") 32 f = open(os_helper.TESTFN, "rb") 41 os_helper.unlink(os_helper.TESTFN)
|
H A D | test_multiprocessing_main_handling.py | 15 from test.support import os_helper namespace 172 with os_helper.temp_dir() as script_dir: 177 with os_helper.temp_dir() as script_dir: 188 with os_helper.temp_dir() as script_dir: 198 with os_helper.temp_dir() as script_dir: 207 with os_helper.temp_dir() as script_dir: 214 with os_helper.temp_dir() as script_dir: 224 with os_helper.temp_dir() as script_dir: 232 with os_helper.temp_dir() as script_dir: 240 with os_helper [all...] |
H A D | test_support.py | 18 from test.support import os_helper namespace 23 TESTFN = os_helper.TESTFN 81 os_helper.unlink(TESTFN) 83 os_helper.unlink(TESTFN) 86 dirpath = os_helper.TESTFN + 'd' 90 os_helper.rmtree(dirpath) 93 os_helper.rmtree(dirpath) 99 os_helper.rmtree(dirpath) 106 os_helper.rmtree(dirpath) 123 os_helper [all...] |
H A D | test__osx_support.py | 11 from test.support import os_helper namespace 22 self.env = self.enterContext(os_helper.EnvironmentVarGuard()) 41 os_helper.unlink(self.prog_name) 43 self.addCleanup(os_helper.unlink, self.prog_name) 54 os_helper.unlink(self.prog_name) 55 self.addCleanup(os_helper.unlink, self.prog_name) 145 os_helper.unlink(c_name) 146 self.addCleanup(os_helper.unlink, c_name) 223 os_helper.unlink(c_name) 224 self.addCleanup(os_helper [all...] |
H A D | test_unicode_file_functions.py | 8 from test.support import os_helper namespace 67 os.mkdir(os_helper.TESTFN) 70 self.addCleanup(os_helper.rmtree, os_helper.TESTFN) 74 name = os.path.join(os_helper.TESTFN, self.norm(name)) 153 f1 = os.listdir(os_helper.TESTFN.encode( 155 f2 = os.listdir(os_helper.TESTFN) 156 sf2 = set(os.path.join(os_helper.TESTFN, f) for f in f2) 166 dirname = os.path.join(os_helper.TESTFN, 169 with os_helper [all...] |
H A D | test_os.py | 34 from test.support import os_helper namespace 68 from test.support.os_helper import FakePath 133 with os_helper.change_cwd(tmpdir) as path: 177 if os.path.lexists(os_helper.TESTFN): 178 os.unlink(os_helper.TESTFN) 182 f = os.open(os_helper.TESTFN, os.O_CREAT|os.O_RDWR) 184 self.assertTrue(os.access(os_helper.TESTFN, os.W_OK)) 193 first = os.open(os_helper.TESTFN, os.O_CREAT|os.O_RDWR) 215 path = os_helper.TESTFN 222 with open(os_helper [all...] |
H A D | test_univnewlines.py | 8 from test.support import os_helper namespace 51 with self.open(os_helper.TESTFN, self.WRITEMODE) as fp: 56 os.unlink(os_helper.TESTFN) 61 with self.open(os_helper.TESTFN, self.READMODE) as fp: 67 with self.open(os_helper.TESTFN, self.READMODE) as fp: 73 with self.open(os_helper.TESTFN, self.READMODE) as fp: 83 with self.open(os_helper.TESTFN, self.READMODE) as fp: 110 with self.open(os_helper.TESTFN, self.READMODE) as fp:
|
H A D | test_dbm.py | 7 from test.support import os_helper namespace 14 dirname = os_helper.TESTFN 15 _fname = os.path.join(dirname, os_helper.TESTFN) 33 os_helper.rmtree(dirname) 77 os_helper.create_empty_file(_fname) 135 dbm.open(os_helper.FakePath(_fname), "c").close() 138 dbm.open(os_helper.FakePath(os.fsencode(_fname)), "c").close() 169 fnames = [_fname, os_helper.FakePath(_fname), 170 _bytes_fname, os_helper.FakePath(_bytes_fname)] 196 fnames = [_fname, os_helper [all...] |
H A D | test_imp.py | 10 from test.support import os_helper namespace 115 os_helper.unlink(temp_mod_name + '.py') 116 os_helper.unlink(temp_mod_name + '.pyc') 200 os_helper.unlink(temp_mod_name + ext) 201 os_helper.unlink(init_file_name + ext) 202 os_helper.rmtree(test_package_name) 203 os_helper.rmtree('__pycache__') 223 with os_helper.EnvironmentVarGuard(): 309 with os_helper.temp_cwd(): 310 source = os_helper [all...] |
H A D | test_dbm_ndbm.py | 2 from test.support import os_helper namespace 12 self.filename = os_helper.TESTFN 18 os_helper.unlink(self.filename + suffix) 105 @unittest.skipUnless(os_helper.TESTFN_NONASCII, 108 filename = os_helper.TESTFN_NONASCII 110 self.addCleanup(os_helper.unlink, filename + suffix) 128 dbm.ndbm.open(os_helper.FakePath(self.filename), "c").close() 134 dbm.ndbm.open(os_helper.FakePath(os.fsencode(self.filename)), "c").close()
|
H A D | test_netrc.py | 2 from test.support import os_helper, run_unittest namespace 9 temp_filename = os_helper.TESTFN 275 @os_helper.skip_unless_working_chmod 279 d = os_helper.TESTFN 281 self.addCleanup(os_helper.rmtree, d) 288 with os_helper.EnvironmentVarGuard() as environ: 301 with os_helper.EnvironmentVarGuard() as environ:
|
H A D | test_linecache.py | 9 from test.support import os_helper namespace 48 self.addCleanup(os_helper.unlink, self.file_name) 128 self.addCleanup(os_helper.unlink, os_helper.TESTFN) 129 with open(os_helper.TESTFN, "w", encoding='utf-8') as fp: 131 lines = linecache.getlines(os_helper.TESTFN) 154 source_name = os_helper.TESTFN + '.py' 155 self.addCleanup(os_helper.unlink, source_name) 246 self.deleted_file = os_helper.TESTFN + '.1' 247 self.modified_file = os_helper [all...] |
H A D | test_lltrace.py | 6 from test.support import os_helper, verbose namespace 24 with open(os_helper.TESTFN, 'w', encoding='utf-8') as fd: 25 self.addCleanup(os_helper.unlink, os_helper.TESTFN) 27 status, stdout, stderr = assert_python_ok(os_helper.TESTFN)
|
/third_party/python/Lib/test/test_tools/ |
H A D | test_fixcid.py | 8 from test.support import os_helper namespace 61 os.mkdir(os_helper.TESTFN) 62 self.addCleanup(os_helper.rmtree, os_helper.TESTFN) 63 c_filename = os.path.join(os_helper.TESTFN, "file.c") 66 with open(os.path.join(os_helper.TESTFN, "file.py"), "w", 70 output = self.run_script(args=(os_helper.TESTFN,)) 79 substfilename = os_helper.TESTFN + ".subst" 82 self.addCleanup(os_helper.unlink, substfilename)
|
H A D | test_pathfix.py | 6 from test.support import os_helper namespace 18 self.addCleanup(os_helper.unlink, os_helper.TESTFN) 28 filename = os_helper.TESTFN 60 tmpdir = os_helper.TESTFN + '.d' 61 self.addCleanup(os_helper.rmtree, tmpdir)
|
H A D | test_md5sum.py | 6 from test.support import os_helper namespace 19 os.mkdir(os_helper.TESTFN_ASCII) 20 cls.fodder = os.path.join(os_helper.TESTFN_ASCII, 'md5sum.fodder') 28 os_helper.rmtree(os_helper.TESTFN_ASCII)
|
/third_party/python/Lib/distutils/tests/ |
H A D | test_spawn.py | 7 from test.support import os_helper namespace 49 with os_helper.temp_dir() as tmp_dir: 51 program_noeext = os_helper.TESTFN 71 with os_helper.change_cwd(tmp_dir): 81 with os_helper.EnvironmentVarGuard() as env: 91 with os_helper.change_cwd(tmp_dir): 96 with os_helper.EnvironmentVarGuard() as env: 105 with os_helper.change_cwd(tmp_dir): 110 with os_helper.EnvironmentVarGuard() as env:
|
H A D | test_core.py | 9 from test.support import os_helper namespace 65 path = os_helper.TESTFN 71 def write_setup(self, text, path=os_helper.TESTFN): 108 os.mkdir(os_helper.TESTFN) 109 setup_py = os.path.join(os_helper.TESTFN, "setup.py")
|