MCPcopy
hub / github.com/pex-tool/pex / test_intransitive

Function test_intransitive

tests/test_resolver.py:219–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217
218
219def test_intransitive():
220 # type: () -> None
221 foo1_0 = build_wheel(name="foo", version="1.0.0")
222 # The nonexistent req ensures that we are actually not acting transitively (as that would fail).
223 bar1_0 = build_wheel(name="bar", version="1.0.0", install_reqs=["nonexistent==1.0.0"])
224 with temporary_dir() as td:
225 for wheel in (foo1_0, bar1_0):
226 safe_copy(wheel, os.path.join(td, os.path.basename(wheel)))
227 with temporary_dir() as cd, cache(cd):
228 resolved_dists = local_resolve(
229 requirements=list(parse_requirement_strings(("foo", "bar"))),
230 repos_configuration=ReposConfiguration.create(find_links=[Repo(td)]),
231 transitive=False,
232 )
233 assert len(resolved_dists) == 2
234
235
236def test_resolve_prereleases():

Callers

nothing calls this directly

Calls 9

temporary_dirFunction · 0.90
safe_copyFunction · 0.90
RepoClass · 0.90
cacheFunction · 0.85
local_resolveFunction · 0.85
build_wheelFunction · 0.70
joinMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected