MCPcopy Index your code
hub / github.com/python/cpython / test_generator_default

Method test_generator_default

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

Source from the content-addressed store, hash-verified

7797 self.assertIsSubclass(type(g), typing.Generator)
7798
7799 def test_generator_default(self):
7800 g1 = typing.Generator[int]
7801 g2 = typing.Generator[int, None, None]
7802 self.assertEqual(get_args(g1), (int, type(None), type(None)))
7803 self.assertEqual(get_args(g1), get_args(g2))
7804
7805 g3 = typing.Generator[int, float]
7806 g4 = typing.Generator[int, float, None]
7807 self.assertEqual(get_args(g3), (int, float, type(None)))
7808 self.assertEqual(get_args(g3), get_args(g4))
7809
7810 def test_no_generator_instantiation(self):
7811 with self.assertRaises(TypeError):

Callers

nothing calls this directly

Calls 2

get_argsFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected