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

Method test_discard

Lib/test/test_weakset.py:240–245  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

238 self.assertRaises(TypeError, self.s.remove, [])
239
240 def test_discard(self):
241 a, q = ustr('a'), ustr('Q')
242 self.s.discard(a)
243 self.assertNotIn(a, self.s)
244 self.s.discard(q)
245 self.assertRaises(TypeError, self.s.discard, [])
246
247 def test_pop(self):
248 for i in range(len(self.s)):

Callers

nothing calls this directly

Calls 3

assertNotInMethod · 0.80
discardMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected