Home
last modified time | relevance | path

Searched refs:tmp_path (Results 1 – 25 of 62) sorted by relevance

123

/external/python/setuptools/setuptools/tests/
Dtest_config_discovery.py24 def test_single_package(self, tmp_path): argument
26 (tmp_path / "src/namespace/pkg/nested").mkdir(exist_ok=True, parents=True)
27 (tmp_path / "src/namespace/pkg/nested/__init__.py").touch()
28 (tmp_path / "src/namespace/pkg/__init__.py").touch()
30 assert find_parent_package(packages, {"": "src"}, tmp_path) == "namespace.pkg"
32 def test_multiple_toplevel(self, tmp_path): argument
37 (tmp_path / f"src/{name}").mkdir(exist_ok=True, parents=True)
38 (tmp_path / f"src/{name}/__init__.py").touch()
39 assert find_parent_package(multiple, {"": "src"}, tmp_path) is None
84 def test_sdist_filelist(self, tmp_path, circumstance): argument
[all …]
Dtest_find_py_modules.py40 def test_finder(self, tmp_path, example): argument
42 ensure_files(tmp_path, files)
43 assert self.find(tmp_path, **kwargs) == set(expected_modules)
46 def test_symlinked_packages_are_included(self, tmp_path): argument
48 ensure_files(tmp_path, [src])
49 os.symlink(tmp_path / src, tmp_path / "link.py")
50 assert self.find(tmp_path) == {"link"}
78 def test_unwanted_files_not_included(self, tmp_path, example): argument
80 ensure_files(tmp_path, files)
81 assert self.find(tmp_path) == set(expected_modules)
Dfixtures.py51 def sample_project(tmp_path): argument
57 subprocess.check_call(cmd, cwd=str(tmp_path))
60 return tmp_path / 'sampleproject'
104 def venv(tmp_path, setuptools_wheel): argument
107 env.root = path.Path(tmp_path / 'venv')
124 def venv_without_setuptools(tmp_path): argument
127 env.root = path.Path(tmp_path / 'venv_without_setuptools')
134 def bare_venv(tmp_path): argument
137 env.root = path.Path(tmp_path / 'bare_venv')
Dtest_dist.py398 def test_dist_default_py_modules(tmp_path, dist_name, py_module): argument
399 (tmp_path / f"{py_module}.py").touch()
401 (tmp_path / "setup.py").touch()
402 (tmp_path / "noxfile.py").touch()
408 "src_root": str(tmp_path)
446 tmp_path, dist_name, package_dir, package_files, packages argument
448 ensure_files(tmp_path, package_files)
450 (tmp_path / "setup.py").touch()
451 (tmp_path / "noxfile.py").touch()
457 "src_root": str(tmp_path),
[all …]
Dtest_editable_install.py10 def venv(tmp_path, setuptools_wheel): argument
13 root=path.Path(tmp_path), # workaround for error on windows
97 def test_editable_with_pyproject(tmp_path, venv, setup_script): argument
98 project = tmp_path / "mypkg"
/external/python/setuptools/setuptools/tests/config/
Dtest_pyprojecttoml.py130 def test_read_configuration(tmp_path): argument
131 create_example(tmp_path, "src")
132 pyproject = tmp_path / "pyproject.toml"
138 verify_example(config, tmp_path, "src")
149 def test_discovered_package_dir_with_attr_directive_in_config(tmp_path, pkg_root, opts): argument
150 create_example(tmp_path, pkg_root)
152 pyproject = tmp_path / "pyproject.toml"
161 verify_example(config, tmp_path, pkg_root)
171 def test_expand_entry_point(tmp_path): argument
174 with open(tmp_path / "entry-points.txt", "w") as f:
[all …]
Dtest_expand.py17 def test_glob_relative(tmp_path, monkeypatch): argument
28 write_files({k: "" for k in files}, tmp_path)
30 monkeypatch.chdir(tmp_path)
33 assert set(expand.glob_relative(patterns, tmp_path)) == files
36 def test_read_files(tmp_path, monkeypatch): argument
38 dir_ = tmp_path / "dir_"
39 (tmp_path / "_dir").mkdir(exist_ok=True)
40 (tmp_path / "a.txt").touch()
63 def test_read_attr(self, tmp_path, monkeypatch): argument
72 write_files(files, tmp_path)
[all …]
Dtest_apply_pyprojecttoml.py31 def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path): argument
34 pyproject_example = Path(tmp_path, "pyproject.toml")
38 dist_toml = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject_example)
39 dist_cfg = setupcfg.apply_configuration(makedist(tmp_path), setupcfg_example)
136 def _pep621_example_project(tmp_path, readme="README.rst"): argument
137 pyproject = tmp_path / "pyproject.toml"
144 (tmp_path / readme).write_text("hello world")
145 (tmp_path / "LICENSE.txt").write_text("--- LICENSE stub ---")
146 (tmp_path / "spam.py").write_text(PEP621_EXAMPLE_SCRIPT)
150 def test_pep621_example(tmp_path): argument
[all …]
/external/pigweed/pw_build/py/
Dzip_test.py85 tmp_path = pathlib.Path(tmp_dir)
86 in_path = make_directory(tmp_path, 'in', IN_FILENAMES)
95 expected_path = make_directory(tmp_path, 'expected', ['file1.txt'])
104 tmp_path = pathlib.Path(tmp_dir)
105 in_path = make_directory(tmp_path, 'in', IN_FILENAMES)
114 expected_path = make_directory(tmp_path, 'expected', [
128 tmp_path = pathlib.Path(tmp_dir)
129 in_path = make_directory(tmp_path, 'in', IN_FILENAMES)
138 expected_path = make_directory(tmp_path, 'expected',
148 tmp_path = pathlib.Path(tmp_dir)
[all …]
/external/libchromeos-rs/src/
Dscoped_path.rs84 let tmp_path = get_temp_path(None); in scopedpath_exists() localVariable
86 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_exists()
89 assert!(!tmp_path.exists()); in scopedpath_exists()
94 let tmp_path = get_temp_path(None); in scopedpath_notexists() localVariable
96 let _scoped_path = ScopedPath(&tmp_path); in scopedpath_notexists()
98 assert!(!tmp_path.exists()); in scopedpath_notexists()
103 let tmp_path = get_temp_path(None); in scopedpath_panic() localVariable
106 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_panic()
112 assert!(tmp_path.exists()); in scopedpath_panic()
113 remove_dir_all(&tmp_path).unwrap(); in scopedpath_panic()
/external/crosvm/base/src/unix/
Dscoped_path.rs107 let tmp_path = get_temp_path(None); in scopedpath_exists() localVariable
109 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_exists()
112 assert!(!tmp_path.exists()); in scopedpath_exists()
117 let tmp_path = get_temp_path(None); in scopedpath_notexists() localVariable
119 let _scoped_path = ScopedPath(&tmp_path); in scopedpath_notexists()
121 assert!(!tmp_path.exists()); in scopedpath_notexists()
126 let tmp_path = get_temp_path(None); in scopedpath_panic() localVariable
129 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_panic()
135 assert!(tmp_path.exists()); in scopedpath_panic()
136 remove_dir_all(&tmp_path).unwrap(); in scopedpath_panic()
/external/crosvm/common/sys_util/src/
Dscoped_path.rs107 let tmp_path = get_temp_path(None); in scopedpath_exists() localVariable
109 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_exists()
112 assert!(!tmp_path.exists()); in scopedpath_exists()
117 let tmp_path = get_temp_path(None); in scopedpath_notexists() localVariable
119 let _scoped_path = ScopedPath(&tmp_path); in scopedpath_notexists()
121 assert!(!tmp_path.exists()); in scopedpath_notexists()
126 let tmp_path = get_temp_path(None); in scopedpath_panic() localVariable
129 let scoped_path = ScopedPath::create(&tmp_path).unwrap(); in scopedpath_panic()
135 assert!(tmp_path.exists()); in scopedpath_panic()
136 remove_dir_all(&tmp_path).unwrap(); in scopedpath_panic()
/external/python/setuptools/setuptools/tests/integration/
Dtest_pip_install_sdist.py86 def venv_python(tmp_path): argument
87 run([*VIRTUALENV, str(tmp_path / ".venv")])
88 possible_path = (str(p.parent) for p in tmp_path.glob(".venv/*/python*"))
93 def _prepare(tmp_path, venv_python, monkeypatch, request): argument
94 download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path))
105 map(print, tmp_path.glob("*"))
116 def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel): argument
118 sdist = retrieve_sdist(package, version, tmp_path)
138 def retrieve_sdist(package, version, tmp_path): argument
144 download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path))
/external/fonttools/Tests/ufoLib/
DufoLib_test.py11 def ufo_path(tmp_path): argument
12 ufodir = tmp_path / "TestFont.ufo"
74 def test_UFOWriter_formatVersion(tmp_path): argument
75 ufo_path = tmp_path / "TestFont.ufo"
84 def test_UFOWriter_formatVersion_default_latest(tmp_path): argument
85 writer = UFOWriter(tmp_path / "TestFont.ufo")
89 def test_UFOWriter_unsupported_format_version(tmp_path): argument
91 UFOWriter(tmp_path, formatVersion=(123, 456))
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_coverage_mapping_libcdep.cc94 InternalScopedString tmp_path(64 + internal_strlen(coverage_dir)); in CovUpdateMapping() local
95 uptr res = internal_snprintf((char *)tmp_path.data(), tmp_path.size(), in CovUpdateMapping()
98 CHECK_LE(res, tmp_path.size()); in CovUpdateMapping()
99 fd_t map_fd = OpenFile(tmp_path.data(), WrOnly, &err); in CovUpdateMapping()
101 Report("Coverage: failed to open %s for writing: %d\n", tmp_path.data(), in CovUpdateMapping()
116 if (!RenameFile(tmp_path.data(), path.data(), &err)) { in CovUpdateMapping()
/external/mesa3d/.gitlab-ci/tracie/tests/
Dtest.py50 def prepare_for_run(tmp_path): argument
55 test_dir = str(tmp_path) + "/run"
68 def cleanup(tmp_path): argument
72 if exists(tmp_path):
73 shutil.rmtree(tmp_path)
77 def run_test(tmp_path): argument
85 logger.debug("Working dir: %s", tmp_path)
86 prepare_for_run(tmp_path)
88 cleanup(tmp_path)
/external/ltp/testcases/kernel/syscalls/nftw/
Dlib.c32 static char *tmp_path = "./tmp"; variable
65 if ((path_length = pathconf(tmp_path, _PC_PATH_MAX)) == -1) { in get_long_name_buffer()
72 if ((name_length = pathconf(tmp_path, _PC_NAME_MAX)) == -1) { in get_long_name_buffer()
79 if ((strlen(tmp_path) + name_length + extra) > path_length) { in get_long_name_buffer()
140 strcpy(buffer, tmp_path); in test_long_file_name()
162 strcpy(buffer, tmp_path); in test_long_component_name()
183 if ((pcPathMax = pathconf(tmp_path, _PC_PATH_MAX)) == -1) { in test_ENAMETOOLONG_path()
191 tmp_path, pcPathMax); in test_ENAMETOOLONG_path()
200 path = strcpy(path, tmp_path); in test_ENAMETOOLONG_path()
209 tmpPtr += sprintf(tmpPtr, "/%s", tmp_path); in test_ENAMETOOLONG_path()
Dlib64.c32 static char *tmp_path = "./tmp"; variable
65 if ((path_length = pathconf(tmp_path, _PC_PATH_MAX)) == -1) { in get_long_name_buffer()
72 if ((name_length = pathconf(tmp_path, _PC_NAME_MAX)) == -1) { in get_long_name_buffer()
79 if ((strlen(tmp_path) + name_length + extra) > path_length) { in get_long_name_buffer()
140 strcpy(buffer, tmp_path); in test_long_file_name()
162 strcpy(buffer, tmp_path); in test_long_component_name()
183 if ((pcPathMax = pathconf(tmp_path, _PC_PATH_MAX)) == -1) { in test_ENAMETOOLONG_path()
191 tmp_path, pcPathMax); in test_ENAMETOOLONG_path()
200 path = strcpy(path, tmp_path); in test_ENAMETOOLONG_path()
209 tmpPtr += sprintf(tmpPtr, "/%s", tmp_path); in test_ENAMETOOLONG_path()
/external/perfetto/gn/standalone/
Dprotoc.py38 tmp_path = os.path.join(tempfile.gettempdir(), str(uuid.uuid4()))
41 tmp_path
46 with open(tmp_path, 'rb') as tmp_rd:
49 if os.path.exists(tmp_path):
50 os.unlink(tmp_path)
/external/libchrome/base/
Dsys_info_unittest.cc77 FilePath tmp_path; in TEST_F() local
78 ASSERT_TRUE(GetTempDir(&tmp_path)); in TEST_F()
79 EXPECT_GE(SysInfo::AmountOfFreeDiskSpace(tmp_path), 0) << tmp_path.value(); in TEST_F()
91 FilePath tmp_path; in TEST_F() local
92 ASSERT_TRUE(GetTempDir(&tmp_path)); in TEST_F()
93 EXPECT_GT(SysInfo::AmountOfTotalDiskSpace(tmp_path), 0) << tmp_path.value(); in TEST_F()
/external/fonttools/Tests/subset/
Dsvg_test.py176 empty_svg_font, add_svg_table, tmp_path, gids, retain_gids, expected_xml argument
180 svg_font_path = tmp_path / "TestSVG.ttf"
465 empty_svg_font, tmp_path, subset_gids, expected_xml argument
470 svg_font_path = tmp_path / "TestSVG.ttf"
490 def test_subset_svg_empty_table(empty_svg_font, tmp_path): argument
497 svg_font_path = tmp_path / "TestSVG.ttf"
507 def test_subset_svg_missing_glyph(empty_svg_font, tmp_path): argument
522 svg_font_path = tmp_path / "TestSVG.ttf"
/external/perfetto/tools/
Dget_perfetto_prebuilt.py82 tmp_path = bin_path + '.tmp'
84 subprocess.check_call(['curl', '-f', '-L', '-#', '-o', tmp_path, url])
85 with open(tmp_path, 'rb') as fd:
90 os.chmod(tmp_path, 0o755)
91 os.rename(tmp_path, bin_path)
Dtraceconv126 tmp_path = bin_path + '.tmp'
128 subprocess.check_call(['curl', '-f', '-L', '-#', '-o', tmp_path, url])
129 with open(tmp_path, 'rb') as fd:
134 os.chmod(tmp_path, 0o755)
135 os.rename(tmp_path, bin_path)
Dtracebox158 tmp_path = bin_path + '.tmp'
160 subprocess.check_call(['curl', '-f', '-L', '-#', '-o', tmp_path, url])
161 with open(tmp_path, 'rb') as fd:
166 os.chmod(tmp_path, 0o755)
167 os.rename(tmp_path, bin_path)
Dtrace_processor158 tmp_path = bin_path + '.tmp'
160 subprocess.check_call(['curl', '-f', '-L', '-#', '-o', tmp_path, url])
161 with open(tmp_path, 'rb') as fd:
166 os.chmod(tmp_path, 0o755)
167 os.rename(tmp_path, bin_path)

123