X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/a02829bea1452e0db150eec88c2d99eaf162aa72..ce14fa8b497bae2b50ec48b3bd7022573a59cdb1:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index 66aa360..acbaade 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -598,6 +598,16 @@ class BlackTestCase(unittest.TestCase): # but not on 3.6, because we use async as a reserved keyword self.invokeBlack([str(source_path), "--target-version", "py36"], exit_code=123) + @patch("black.dump_to_file", dump_to_stderr) + def test_python38(self) -> None: + source, expected = read_data("python38") + actual = fs(source) + self.assertFormatEqual(expected, actual) + major, minor = sys.version_info[:2] + if major > 3 or (major == 3 and minor >= 8): + black.assert_equivalent(source, actual) + black.assert_stable(source, actual, black.FileMode()) + @patch("black.dump_to_file", dump_to_stderr) def test_fmtonoff(self) -> None: source, expected = read_data("fmtonoff")