]> git.madduck.net Git - etc/vim.git/blobdiff - tests/util.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Quote black[jupyter] and black[d] in installation docs (#3006)
[etc/vim.git] / tests / util.py
index 84e98bb0fbde883da8d61545c935c7904641c232..8755111f7c57716c76a8394711e2608cb621490b 100644 (file)
@@ -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