X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f2ea461e9e9fa5c47bb61fd72d512c748928badc..0fd353f1639c580c32599bf435902d08dbd9a560:/tests/test_format.py diff --git a/tests/test_format.py b/tests/test_format.py index e59d521..fc9678a 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, @@ -42,6 +41,7 @@ SIMPLE_CASES = [ "fmtskip3", "fmtskip4", "fmtskip5", + "fmtskip6", "fstring", "function", "function2", @@ -135,11 +135,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)