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

Method test_init

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

Source from the content-addressed store, hash-verified

372 basetype = set
373
374 def test_init(self):
375 s = self.thetype()
376 s.__init__(self.word)
377 self.assertEqual(s, set(self.word))
378 s.__init__(self.otherword)
379 self.assertEqual(s, set(self.otherword))
380 self.assertRaises(TypeError, s.__init__, s, 2)
381 self.assertRaises(TypeError, s.__init__, 1)
382
383 def test_constructor_identity(self):
384 s = self.thetype(range(3))

Callers

nothing calls this directly

Calls 4

setFunction · 0.85
__init__Method · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected