X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/be49ac72a04dd70d3f496d3d062405ad4166ea0b..7a14a37981862ef418f3cdb4a7e2375856f97529:/tests/test_black.py?ds=inline diff --git a/tests/test_black.py b/tests/test_black.py index acbaade..7a4a3bb 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -1645,6 +1645,16 @@ class BlackTestCase(unittest.TestCase): raise result.exception self.assertEqual(result.exit_code, 0) + def test_invalid_config_return_code(self) -> None: + tmp_file = Path(black.dump_to_file()) + try: + tmp_config = Path(black.dump_to_file()) + tmp_config.unlink() + args = ["--config", str(tmp_config), str(tmp_file)] + self.invokeBlack(args, exit_code=2, ignore_config=False) + finally: + tmp_file.unlink() + class BlackDTestCase(AioHTTPTestCase): async def get_application(self) -> web.Application: