Skip to content

Commit

Permalink
Add syntax validation
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jul 22, 2024
1 parent e2d5aa8 commit 1521c90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,10 @@ class TestClass:
gen.generate_class_stub("C", TestClass, output)
assert_equal(output, ["class C[T]: ..."])

@unittest.skipIf(sys.version_info < (3, 12), "Inline Generics not supported before Python3.12")
def test_generic_class(self) -> None:
exec("class Test[A]: ...")

@unittest.skipIf(sys.version_info < (3, 12), "Inline Generics not supported before Python3.12")
def test_inline_generic_function(self) -> None:

Expand Down

0 comments on commit 1521c90

Please sign in to comment.