X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/026c81b83454f176a9f9253cbfb70be2c159d822..d6db1c12a8e14833fe22da377cddc2bd1f43dc14:/tests/test_black.py?ds=sidebyside diff --git a/tests/test_black.py b/tests/test_black.py index 7c99f00..645eec7 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -461,6 +461,14 @@ class BlackTestCase(unittest.TestCase): # black.assert_equivalent(source, actual) black.assert_stable(source, actual, black.FileMode()) + @patch("black.dump_to_file", dump_to_stderr) + def test_python2_print_function(self) -> None: + source, expected = read_data("python2_print_function") + mode = black.FileMode(target_versions={black.TargetVersion.PY27}) + actual = fs(source, mode=mode) + self.assertFormatEqual(expected, actual) + black.assert_stable(source, actual, mode) + @patch("black.dump_to_file", dump_to_stderr) def test_python2_unicode_literals(self) -> None: source, expected = read_data("python2_unicode_literals")