Beispiel #1
0
 def assert_owned(owned: Iterable[str], exported: Address):
     tgt = rule_runner.get_target(exported)
     assert sorted(owned) == sorted(
         od.target.address.spec for od in rule_runner.request(
             OwnedDependencies,
             [DependencyOwner(ExportedTarget(tgt))],
         ))
Beispiel #2
0
 def assert_requirements(expected_req_strs, addr):
     tgt = rule_runner.get_target(Address.parse(addr))
     reqs = rule_runner.request(
         ExportedTargetRequirements,
         [DependencyOwner(ExportedTarget(tgt))],
     )
     assert sorted(expected_req_strs) == list(reqs)
Beispiel #3
0
 def assert_requirements(
     expected_req_strs,
     addr: Address,
     *,
     version_scheme: FirstPartyDependencyVersionScheme = FirstPartyDependencyVersionScheme.EXACT,
 ):
     rule_runner.set_options(
         [f"--setup-py-generation-first-party-dependency-version-scheme={version_scheme.value}"],
         env_inherit={"PATH", "PYENV_ROOT", "HOME"},
     )
     tgt = rule_runner.get_target(addr)
     reqs = rule_runner.request(
         ExportedTargetRequirements,
         [DependencyOwner(ExportedTarget(tgt))],
     )
     assert sorted(expected_req_strs) == list(reqs)