X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/b719d85ccc330170e40b2617307a7e3b2a0bab14..883689366ce0f0e0ddd66d81360c61abfd19b01a:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index 10d7f28..9c798ca 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -411,6 +411,16 @@ class BlackTestCase(unittest.TestCase): self.assertFormatEqual(expected, actual) black.assert_stable(source, actual, line_length=ll, mode=mode) + @patch("black.dump_to_file", dump_to_stderr) + def test_python37(self) -> None: + source, expected = read_data("python37") + actual = fs(source) + self.assertFormatEqual(expected, actual) + major, minor = sys.version_info[:2] + if major > 3 or (major == 3 and minor >= 7): + black.assert_equivalent(source, actual) + black.assert_stable(source, actual, line_length=ll) + @patch("black.dump_to_file", dump_to_stderr) def test_fmtonoff(self) -> None: source, expected = read_data("fmtonoff")