X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f2ea461e9e9fa5c47bb61fd72d512c748928badc..754eecf69eed0bdc75fe224c19a702a4f0676807:/tests/test_format.py diff --git a/tests/test_format.py b/tests/test_format.py index e59d521..5c78afe 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -7,7 +7,6 @@ from parameterized import parameterized from tests.util import ( BlackBaseTestCase, fs, - ff, DEFAULT_MODE, dump_to_stderr, read_data, @@ -135,11 +134,11 @@ class TestSimpleFormat(BlackBaseTestCase): def test_source_is_formatted(self, filename: str) -> None: path = THIS_DIR.parent / filename self.check_file(str(path), DEFAULT_MODE, data=False) - self.assertFalse(ff(path)) def check_file(self, filename: str, mode: black.Mode, *, data: bool = True) -> None: source, expected = read_data(filename, data=data) actual = fs(source, mode=mode) self.assertFormatEqual(expected, actual) - black.assert_equivalent(source, actual) - black.assert_stable(source, actual, mode) + if source != actual: + black.assert_equivalent(source, actual) + black.assert_stable(source, actual, mode)