Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly resolve transitive dependencies in V2 Pytest runner #7720

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix transitive deps not resolving properly
  • Loading branch information
Eric-Arellano committed May 14, 2019
commit 20a045d3a0f507715f41875ebcdb73d1a7ba0085
9 changes: 8 additions & 1 deletion src/python/pants/backend/python/rules/python_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 58,14 @@ def run_python_test(transitive_hydrated_target, pytest, python_setup, source_roo
digest = Digest('61bb79384db0da8c844678440bd368bcbfac17bbdb865721ad3f9cb0ab29b629', 1826945)
pex_snapshot = yield Get(Snapshot, UrlToFetch(url, digest))

all_targets = [target_root] [dep.root for dep in transitive_hydrated_target.dependencies]
all_targets = set()
def add_transitive_deps(hydrated_target):
all_targets.add(hydrated_target.root)
for dep in hydrated_target.dependencies:
add_transitive_deps(dep)

add_transitive_deps(transitive_hydrated_target)


# Produce a pex containing pytest and all transitive 3rdparty requirements.
all_requirements = []
Expand Down