15f70ee5e5a6d9ab272bed0ea66f541c6c91b091,src/python/pants/backend/project_info/list_targets_test.py,,run_goal,#,20
Before Change
show_provides: bool = False,
provides_columns: Optional[str] = None,
) -> Tuple[str, str]:
console = MockConsole(use_colors=False)
run_rule_with_mocks(
list_targets,
rule_args=[
Addresses(tgt.address for tgt in targets),
create_goal_subsystem(
ListSubsystem,
sep="\\n",
output_file=None,
documented=show_documented,
provides=show_provides,
provides_columns=provides_columns or "address,artifact_id",
),
console,
],
mock_gets=[
MockGet(
output_type=UnexpandedTargets,
input_type=Addresses,
mock=lambda _: UnexpandedTargets(targets),
)
],
)
return cast(str, console.stdout.getvalue()), cast(str, console.stderr.getvalue())
def test_list_normal() -> None:
After Change
show_provides: bool = False,
provides_columns: str | None = None,
) -> tuple[str, str]:
with mock_console(create_options_bootstrapper()) as (console, stdio_reader):
run_rule_with_mocks(
list_targets,
rule_args=[
Addresses(tgt.address for tgt in targets),
create_goal_subsystem(
ListSubsystem,
sep="\\n",
output_file=None,
documented=show_documented,
provides=show_provides,
provides_columns=provides_columns or "address,artifact_id",
),
console,
],
mock_gets=[
MockGet(
output_type=UnexpandedTargets,
input_type=Addresses,
mock=lambda _: UnexpandedTargets(targets),
)
],
)
return stdio_reader.get_stdout(), stdio_reader.get_stderr()
def test_list_normal() -> None:
// Note that these are unsorted.
target_names = ("t3", "t2", "t1")
stdout, _ = run_goal(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: pantsbuild/pants
Commit Name: 15f70ee5e5a6d9ab272bed0ea66f541c6c91b091
Time: 2021-04-09
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/project_info/list_targets_test.py
Class Name:
Method Name: run_goal
Project Name: pantsbuild/pants
Commit Name: 15f70ee5e5a6d9ab272bed0ea66f541c6c91b091
Time: 2021-04-09
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/project_info/filter_targets_test.py
Class Name:
Method Name: run_goal
Project Name: pantsbuild/pants
Commit Name: 3f431b9aba35ce9f2df33cf9fc0dd786c2fe3f91
Time: 2021-04-02
Author: dawagner@gmail.com
File Name: src/python/pants/core/goals/tailor_test.py
Class Name:
Method Name: test_tailor_rule