X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/1b6de7b0a33b568f71ff86e0e5fef6d4c479c2b7..159984a7351bfc4789bc0fc85b5f408112efca85:/tests/test_format.py?ds=sidebyside diff --git a/tests/test_format.py b/tests/test_format.py index 7a099fb..01cd61e 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -8,10 +8,10 @@ import black from tests.util import ( DEFAULT_MODE, PY36_VERSIONS, + all_data_cases, assert_format, dump_to_stderr, read_data, - all_data_cases, ) @@ -36,7 +36,12 @@ def test_simple_format(filename: str) -> None: @pytest.mark.parametrize("filename", all_data_cases("preview")) def test_preview_format(filename: str) -> None: - check_file("preview", filename, black.Mode(preview=True)) + magic_trailing_comma = filename != "skip_magic_trailing_comma" + check_file( + "preview", + filename, + black.Mode(preview=True, magic_trailing_comma=magic_trailing_comma), + ) @pytest.mark.parametrize("filename", all_data_cases("preview_39"))