From: Ɓukasz Langa Date: Mon, 24 Aug 2020 19:33:51 +0000 (+0200) Subject: Run trailing comma tests with TargetVersion.PY38 X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/d46268cd671760d4c370476006795919951b1076 Run trailing comma tests with TargetVersion.PY38 --- diff --git a/tests/test_black.py b/tests/test_black.py index bb1929e..16002c0 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -593,7 +593,8 @@ class BlackTestCase(unittest.TestCase): @patch("black.dump_to_file", dump_to_stderr) def test_comments7(self) -> None: source, expected = read_data("comments7") - actual = fs(source) + mode = replace(DEFAULT_MODE, target_versions={black.TargetVersion.PY38}) + actual = fs(source, mode=mode) self.assertFormatEqual(expected, actual) black.assert_equivalent(source, actual) black.assert_stable(source, actual, DEFAULT_MODE) @@ -633,7 +634,8 @@ class BlackTestCase(unittest.TestCase): @patch("black.dump_to_file", dump_to_stderr) def test_composition_no_trailing_comma(self) -> None: source, expected = read_data("composition_no_trailing_comma") - actual = fs(source) + mode = replace(DEFAULT_MODE, target_versions={black.TargetVersion.PY38}) + actual = fs(source, mode=mode) self.assertFormatEqual(expected, actual) black.assert_equivalent(source, actual) black.assert_stable(source, actual, DEFAULT_MODE)