MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_generator_default

Method test_generator_default

Lib/test/test_typing.py:7718–7727  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7716 self.assertIsSubclass(type(g), typing.Generator)
7717
7718 def test_generator_default(self):
7719 g1 = typing.Generator[int]
7720 g2 = typing.Generator[int, None, None]
7721 self.assertEqual(get_args(g1), (int, type(None), type(None)))
7722 self.assertEqual(get_args(g1), get_args(g2))
7723
7724 g3 = typing.Generator[int, float]
7725 g4 = typing.Generator[int, float, None]
7726 self.assertEqual(get_args(g3), (int, float, type(None)))
7727 self.assertEqual(get_args(g3), get_args(g4))
7728
7729 def test_no_generator_instantiation(self):
7730 with self.assertRaises(TypeError):

Callers

nothing calls this directly

Calls 2

get_argsFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected