X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/dc90d4951f66ac665582159537b902017d9a0361..05e1fbf27d93df36b09c560791ad46c6ce3eb518:/tests/test_black.py?ds=sidebyside diff --git a/tests/test_black.py b/tests/test_black.py index 8726cc1..628647e 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -818,6 +818,18 @@ class BlackTestCase(BlackBaseTestCase): self.assertEqual(black.get_features_used(node), {Feature.UNPACKING_ON_FLOW}) node = black.lib2to3_parse("def fn(): return a, *b, c") self.assertEqual(black.get_features_used(node), {Feature.UNPACKING_ON_FLOW}) + node = black.lib2to3_parse("x = a, *b, c") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("x: Any = regular") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("x: Any = (regular, regular)") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("x: Any = Complex(Type(1))[something]") + self.assertEqual(black.get_features_used(node), set()) + node = black.lib2to3_parse("x: Tuple[int, ...] = a, b, c") + self.assertEqual( + black.get_features_used(node), {Feature.ANN_ASSIGN_EXTENDED_RHS} + ) def test_get_features_used_for_future_flags(self) -> None: for src, features in [