3222b9728d9f07cbce611ba6c57ef0d640d033a6,src/python/pants/backend/python/lint/docformatter/rules_integration_test.py,,test_stub_files,#Any#,145

Before Change


    target = make_target(rule_runner, [BAD_SOURCE, bad_stub])
    lint_results, fmt_result = run_docformatter(rule_runner, [target])
    assert len(lint_results) == 1 and lint_results[0].exit_code == 3
    assert bad_stub.path in lint_results[0].stderr
    assert BAD_SOURCE.path in lint_results[0].stderr
    fixed_bad_files = [FIXED_BAD_SOURCE, fixed_bad_stub]
    assert fmt_result.output == get_digest(rule_runner, [*fixed_bad_files, *good_files])
    assert fmt_result.did_change

After Change




def test_stub_files(rule_runner: RuleRunner) -> None:
    rule_runner.write_files(
        {"good.pyi": GOOD_FILE, "bad.pyi": BAD_FILE, "BUILD": "python_library(name="t")"}
    )

    good_tgt = rule_runner.get_target(Address("", target_name="t", relative_file_path="good.pyi"))
    lint_results, fmt_result = run_docformatter(rule_runner, [good_tgt])
    assert len(lint_results) == 1 and lint_results[0].exit_code == 0
    assert lint_results[0].stderr == "" and fmt_result.stdout == ""
    assert fmt_result.output == get_digest(rule_runner, {"good.pyi": GOOD_FILE})
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/docformatter/rules_integration_test.py
Class Name:
Method Name: test_stub_files


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/bandit/rules_integration_test.py
Class Name:
Method Name: test_respects_config_file


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/flake8/rules_integration_test.py
Class Name:
Method Name: test_type_stubs


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/flake8/rules_integration_test.py
Class Name:
Method Name: test_respects_config_file


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/bandit/rules_integration_test.py
Class Name:
Method Name: test_type_stubs


Project Name: pantsbuild/pants
Commit Name: 3222b9728d9f07cbce611ba6c57ef0d640d033a6
Time: 2021-04-05
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/docformatter/rules_integration_test.py
Class Name:
Method Name: test_stub_files