X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9f096d55365cb63548eef97e254c2793ae2776a0..2d9eaafa97e967c8974a6321dcc442a90192140f:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index 02926d1..5e17faf 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -636,6 +636,12 @@ class BlackTestCase(unittest.TestCase): ) self.assertEqual(result.exit_code, 1) + def test_no_files(self) -> None: + with cache_dir(): + # Without an argument, black exits with error code 0. + result = CliRunner().invoke(black.main, []) + self.assertEqual(result.exit_code, 0) + def test_read_cache_line_lengths(self) -> None: with cache_dir() as workspace: path = (workspace / "file.py").resolve()