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