3222b9728d9f07cbce611ba6c57ef0d640d033a6,src/python/pants/backend/python/lint/black/rules_integration_test.py,,test_respects_config_file,#Any#,160
Before Change
def test_respects_config_file(rule_runner: RuleRunner) -> None:
target = make_target(rule_runner, [NEEDS_CONFIG_SOURCE])
lint_results, fmt_result = run_black(
rule_runner, [target], config="[tool.black]\nskip-string-normalization = "true"\n"
)
assert len(lint_results) == 1
assert lint_results[0].exit_code == 0
assert "1 file would be left unchanged" in lint_results[0].stderr
assert "1 file left unchanged" in fmt_result.stderr
After Change
def test_respects_config_file(rule_runner: RuleRunner) -> None:
rule_runner.write_files(
{
"f.py": NEEDS_CONFIG_FILE,
"pyproject.toml": "[tool.black]\nskip-string-normalization = "true"\n",
"BUILD": "python_library(name="t")",
}
)
tgt = rule_runner.get_target(Address("", target_name="t", relative_file_path="f.py"))
lint_results, fmt_result = run_black(
rule_runner, [tgt], extra_args=["--black-config=pyproject.toml"]
)
assert len(lint_results) == 1
assert lint_results[0].exit_code == 0
assert "1 file would be left unchanged" in lint_results[0].stderr
assert "1 file left unchanged" in fmt_result.stderr
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
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/black/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/black/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/black/rules_integration_test.py
Class Name:
Method Name: test_respects_passthrough_args
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/black/rules_integration_test.py
Class Name:
Method Name: test_works_with_python39