fixup! fixup! Color the full diff that pytest shows as a diff

This commit is contained in:
Benjamin Schubert 2023-10-21 14:06:06 +01:00
parent 2f649bf5c2
commit 7cbe6ef913
1 changed files with 3 additions and 3 deletions

View File

@ -1795,7 +1795,7 @@ def test_reprcompare_verbose_long() -> None:
@pytest.mark.parametrize("enable_colors", [True, False]) @pytest.mark.parametrize("enable_colors", [True, False])
@pytest.mark.parametrize( @pytest.mark.parametrize(
("code", "expected_lines"), ("test_code", "expected_lines"),
( (
( (
""" """
@ -1823,9 +1823,9 @@ def test_reprcompare_verbose_long() -> None:
), ),
) )
def test_comparisons_handle_colors( def test_comparisons_handle_colors(
pytester: Pytester, color_mapping, enable_colors, code, expected_lines pytester: Pytester, color_mapping, enable_colors, test_code, expected_lines
) -> None: ) -> None:
p = pytester.makepyfile(code) p = pytester.makepyfile(test_code)
result = pytester.runpytest( result = pytester.runpytest(
f"--color={'yes' if enable_colors else 'no'}", "-vv", str(p) f"--color={'yes' if enable_colors else 'no'}", "-vv", str(p)
) )