X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3e60f6d454616a795acb1e3e2b43efa979de4f46..a02829bea1452e0db150eec88c2d99eaf162aa72:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index 40bde36..66aa360 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -778,6 +778,13 @@ class BlackTestCase(unittest.TestCase): "2 files would be reformatted, 3 files would be left unchanged, " "2 files would fail to reformat.", ) + report.check = False + report.diff = True + self.assertEqual( + unstyle(str(report)), + "2 files would be reformatted, 3 files would be left unchanged, " + "2 files would fail to reformat.", + ) def test_report_quiet(self) -> None: report = black.Report(quiet=True) @@ -865,6 +872,13 @@ class BlackTestCase(unittest.TestCase): "2 files would be reformatted, 3 files would be left unchanged, " "2 files would fail to reformat.", ) + report.check = False + report.diff = True + self.assertEqual( + unstyle(str(report)), + "2 files would be reformatted, 3 files would be left unchanged, " + "2 files would fail to reformat.", + ) def test_report_normal(self) -> None: report = black.Report() @@ -955,6 +969,13 @@ class BlackTestCase(unittest.TestCase): "2 files would be reformatted, 3 files would be left unchanged, " "2 files would fail to reformat.", ) + report.check = False + report.diff = True + self.assertEqual( + unstyle(str(report)), + "2 files would be reformatted, 3 files would be left unchanged, " + "2 files would fail to reformat.", + ) def test_lib2to3_parse(self) -> None: with self.assertRaises(black.InvalidInput):