Skip to content

Commit

Permalink
test_inject_python_distribution_dependencies: fix test issue.
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
kaos committed Jul 9, 2021
1 parent 8e1f580 commit fcb3c3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/python/pants/backend/python/target_types_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ async def inject_python_distribution_dependencies(
original_tgt.target[PythonDistributionEntryPoints]
),
)

entry_point_addresses = Addresses()

if entry_points.val and python_infer_subsystem.entry_points:
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/python/target_types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
inject_pex_binary_entry_point_dependency,
inject_python_distribution_dependencies,
resolve_pex_entry_point,
resolve_python_distribution_entry_points,
)
from pants.backend.python.util_rules import python_sources
from pants.engine.addresses import Address
from pants.engine.internals.scheduler import ExecutionError
from pants.engine.target import (
Expand Down Expand Up @@ -343,7 +345,10 @@ def test_inject_python_distribution_dependencies() -> None:
rule_runner = RuleRunner(
rules=[
inject_python_distribution_dependencies,
resolve_pex_entry_point,
resolve_python_distribution_entry_points,
*import_rules(),
*python_sources.rules(),
QueryRule(InjectedDependencies, [InjectPythonDistributionDependencies]),
],
target_types=[PythonDistribution, PythonRequirementLibrary, PythonLibrary, PexBinary],
Expand Down

0 comments on commit fcb3c3a

Please sign in to comment.