X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2893c42176903c8b6c28c46ff9e046861328b6a8..fa6caa6ca8489103d22d23f8f4ae4d3569bb115e:/tests/test_black.py?ds=inline diff --git a/tests/test_black.py b/tests/test_black.py index a633e67..8adcaed 100644 --- a/tests/test_black.py +++ b/tests/test_black.py @@ -804,6 +804,12 @@ class BlackTestCase(BlackBaseTestCase): 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}) + node = black.lib2to3_parse("a[*b]") + self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS}) + node = black.lib2to3_parse("a[x, *y(), z] = t") + self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS}) + node = black.lib2to3_parse("def fn(*args: *T): pass") + self.assertEqual(black.get_features_used(node), {Feature.VARIADIC_GENERICS}) def test_get_features_used_for_future_flags(self) -> None: for src, features in [ @@ -1455,7 +1461,6 @@ class BlackTestCase(BlackBaseTestCase): black.assert_stable(source, output, mode=DEFAULT_MODE) def test_bpo_2142_workaround(self) -> None: - # https://bugs.python.org/issue2142 source, _ = read_data("miscellaneous", "missing_final_newline")