X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/fa5fd262fffd577e3c5d573af9c2fa0af2991be1..c940f75d5b646777427aef1beb18a0d2c391f5e2:/tests/test_black.py 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 [