X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fa5fd262fffd577e3c5d573af9c2fa0af2991be1..8ed3e3d07ea3e6d62e3e533e69f96a0ff148cd5d:/tests/test_black.py?ds=inline diff --git a/tests/test_black.py b/tests/test_black.py index 20cc9f7..f6663fa 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -794,6 +794,12 @@ class BlackTestCase(BlackBaseTestCase): self.assertEqual( black.get_features_used(node), {Feature.ANN_ASSIGN_EXTENDED_RHS} ) + node = black.lib2to3_parse("try: pass\nexcept Something: pass") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("try: pass\nexcept (*Something,): pass") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("try: pass\nexcept *Group: pass") + self.assertEqual(black.get_features_used(node), {Feature.EXCEPT_STAR}) def test_get_features_used_for_future_flags(self) -> None: for src, features in [