15f70ee5e5a6d9ab272bed0ea66f541c6c91b091,src/python/pants/backend/project_info/filter_targets_test.py,,run_goal,#,32

Before Change


            RegisteredTargetTypes.create({type(tgt) for tgt in targets}),
        ],
    )
    assert not console.stderr.getvalue()
    return cast(str, console.stdout.getvalue())


def test_no_filters_provided() -> None:

After Change


    tag_regex: list[str] | None = None,
    granularity: TargetGranularity | None = None,
) -> str:
    with mock_console(create_options_bootstrapper()) as (console, stdio_reader):
        run_rule_with_mocks(
            filter_targets,
            rule_args=[
                Targets(targets),
                create_goal_subsystem(
                    FilterSubsystem,
                    sep="\\n",
                    output_file=None,
                    target_type=target_type or [],
                    address_regex=address_regex or [],
                    tag_regex=tag_regex or [],
                    granularity=granularity or TargetGranularity.all_targets,
                    // Deprecated.
                    type=[],
                    target=[],
                    regex=[],
                    ancestor=[],
                ),
                console,
                RegisteredTargetTypes.create({type(tgt) for tgt in targets}),
            ],
        )
        assert not stdio_reader.get_stderr()
        return stdio_reader.get_stdout()


def test_no_filters_provided() -> None:
    // `filter` behaves like `list` when there are no specified filters.
    targets = [MockTarget({}, address=Address("", target_name=name)) for name in ("t3", "t2", "t1")]
    assert run_goal(targets) == dedent(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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/filter_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/engine/goal_test.py
Class Name:
Method Name: test_line_oriented_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/core/goals/typecheck_test.py
Class Name:
Method Name: run_typecheck_rule