X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/dcd77136f8f62b35007ca11407cd04d7b62daed2..8429f3a63b4577c6fd35872072711858511e8d2d:/tests/test_black.py diff --git a/tests/test_black.py b/tests/test_black.py index a64033c..fc31069 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -105,7 +105,7 @@ class BlackTestCase(unittest.TestCase): self.assertFormatEqual(expected, actual) black.assert_equivalent(source, actual) black.assert_stable(source, actual, line_length=ll) - self.assertIs(ff(THIS_FILE), black.Changed.NO) + self.assertFalse(ff(THIS_FILE)) @patch("black.dump_to_file", dump_to_stderr) def test_black(self) -> None: @@ -114,7 +114,7 @@ class BlackTestCase(unittest.TestCase): self.assertFormatEqual(expected, actual) black.assert_equivalent(source, actual) black.assert_stable(source, actual, line_length=ll) - self.assertIs(ff(THIS_DIR / ".." / "black.py"), black.Changed.NO) + self.assertFalse(ff(THIS_DIR / ".." / "black.py")) def test_piping(self) -> None: source, expected = read_data("../black") @@ -157,7 +157,7 @@ class BlackTestCase(unittest.TestCase): self.assertFormatEqual(expected, actual) black.assert_equivalent(source, actual) black.assert_stable(source, actual, line_length=ll) - self.assertIs(ff(THIS_DIR / ".." / "setup.py"), black.Changed.NO) + self.assertFalse(ff(THIS_DIR / ".." / "setup.py")) @patch("black.dump_to_file", dump_to_stderr) def test_function(self) -> None: @@ -590,7 +590,7 @@ class BlackTestCase(unittest.TestCase): self.assertNotIn(failing, cache) self.assertIn(clean, cache) - def test_write_cache_write_fail(self): + def test_write_cache_write_fail(self) -> None: with cache_dir(), patch.object(Path, "open") as mock: mock.side_effect = OSError black.write_cache({}, [])