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

Method test_constructor

Lib/test/test_set.py:1813–1820  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1811class TestVariousIteratorArgs(unittest.TestCase):
1812
1813 def test_constructor(self):
1814 for cons in (set, frozenset):
1815 for s in ("123", "", range(1000), ('do', 1.2), range(2000,2200,5)):
1816 for g in (G, I, Ig, S, L, R):
1817 self.assertEqual(sorted(cons(g(s)), key=repr), sorted(g(s), key=repr))
1818 self.assertRaises(TypeError, cons , X(s))
1819 self.assertRaises(TypeError, cons , N(s))
1820 self.assertRaises(ZeroDivisionError, cons , E(s))
1821
1822 def test_inline_methods(self):
1823 s = set('november')

Callers

nothing calls this directly

Calls 6

gFunction · 0.70
XClass · 0.70
NClass · 0.70
EClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected