X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/3500e1cda5bef73ddc7eaf79be6c67c918738936..96bd428524763fc443ac1729e7254ccbe872d5ca:/tests/util.py diff --git a/tests/util.py b/tests/util.py index 84e98bb..8755111 100644 --- a/tests/util.py +++ b/tests/util.py @@ -9,7 +9,7 @@ from typing import Any, Iterator, List, Optional, Tuple import black from black.debug import DebugVisitor from black.mode import TargetVersion -from black.output import err, out +from black.output import diff, err, out THIS_DIR = Path(__file__).parent DATA_DIR = THIS_DIR / "data" @@ -47,6 +47,9 @@ def _assert_format_equal(expected: str, actual: str) -> None: except Exception as ve: err(str(ve)) + if actual != expected: + out(diff(expected, actual, "expected", "actual")) + assert actual == expected