X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f71db23824a25300618dd0625085ade8d2b3a7a8..2228890d6210e10d9ea3c24cb123a4d6b47f36b9:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index e555ba9..84b7a61 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -176,10 +176,10 @@ class BlackTestCase(unittest.TestCase): ) source, _ = read_data("expression.py") expected, _ = read_data("expression.diff") + config = THIS_DIR / "data" / "empty_pyproject.toml" stderrbuf = BytesIO() - result = BlackRunner(stderrbuf).invoke( - black.main, ["-", "--fast", f"--line-length={ll}", "--diff"], input=source - ) + args = ["-", "--fast", f"--line-length={ll}", "--diff", f"--config={config}"] + result = BlackRunner(stderrbuf).invoke(black.main, args, input=source) self.assertEqual(result.exit_code, 0) actual = diff_header.sub("[Deterministic header]", result.output) actual = actual.rstrip() + "\n" # the diff output has a trailing space @@ -1164,4 +1164,4 @@ class BlackTestCase(unittest.TestCase): if __name__ == "__main__": - unittest.main() + unittest.main(module="test_black")