Best Python code snippet using tox_python
test_resolver.py
Source:test_resolver.py
...16 with temporary_dir() as td:17 empty_resolve = resolve([], cache=td)18 assert empty_resolve == []19def test_simple_local_resolve():20 project_sdist = make_sdist(name='project')21 with temporary_dir() as td:22 safe_copy(project_sdist, os.path.join(td, os.path.basename(project_sdist)))23 fetchers = [Fetcher([td])]24 dists = resolve(['project'], fetchers=fetchers)25 assert len(dists) == 126def test_diamond_local_resolve_cached():27 # This exercises the issue described here: https://github.com/pantsbuild/pex/issues/12028 project1_sdist = make_sdist(name='project1', install_reqs=['project2<1.0.0'])29 project2_sdist = make_sdist(name='project2')30 with temporary_dir() as dd:31 for sdist in (project1_sdist, project2_sdist):32 safe_copy(sdist, os.path.join(dd, os.path.basename(sdist)))33 fetchers = [Fetcher([dd])]34 with temporary_dir() as cd:35 dists = resolve(['project1', 'project2'], fetchers=fetchers, cache=cd, cache_ttl=1000)36 assert len(dists) == 237def test_resolvable_set():38 builder = ResolverOptionsBuilder()39 rs = _ResolvableSet()40 rq = ResolvableRequirement.from_string('foo[ext]', builder)41 source_pkg = SourcePackage.from_href('foo-2.3.4.tar.gz')42 binary_pkg = EggPackage.from_href('Foo-2.3.4-py3.4.egg')43 rs.merge(rq, [source_pkg, binary_pkg])...
__init__.py
Source:__init__.py
1from .isolated import build2from .legacy import make_sdist3def build_package(config, session):4 if not config.isolated_build:5 return make_sdist(config, session)6 else:...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!