(self)
| 332 | self.assertNotEqual(LiteralString, None) |
| 333 | |
| 334 | def test_basics(self): |
| 335 | class Foo: |
| 336 | def bar(self) -> LiteralString: ... |
| 337 | class FooStr: |
| 338 | def bar(self) -> 'LiteralString': ... |
| 339 | class FooStrTyping: |
| 340 | def bar(self) -> 'typing.LiteralString': ... |
| 341 | |
| 342 | for target in [Foo, FooStr, FooStrTyping]: |
| 343 | with self.subTest(target=target): |
| 344 | self.assertEqual(gth(target.bar), {'return': LiteralString}) |
| 345 | self.assertIs(get_origin(LiteralString), None) |
| 346 | |
| 347 | def test_repr(self): |
| 348 | self.assertEqual(repr(LiteralString), 'typing.LiteralString') |
nothing calls this directly
no test coverage detected