MCPcopy Create free account
hub / github.com/rthalley/dnspython / testPop

Method testPop

tests/test_set.py:222–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

220 self.assertTrue(s1.isdisjoint(s2))
221
222 def testPop(self):
223 original = S([1, 2, 3])
224 s1 = original.copy()
225 item = s1.pop()
226 self.assertTrue(len(s1) == 2)
227 self.assertTrue(item in original)
228 item = s1.pop()
229 self.assertTrue(len(s1) == 1)
230 self.assertTrue(item in original)
231 item = s1.pop()
232 self.assertTrue(len(s1) == 0)
233 self.assertTrue(item in original)
234 self.assertRaises(KeyError, lambda: s1.pop())
235
236 def testUpdate1(self):
237 s1 = S([1, 2, 3])

Callers

nothing calls this directly

Calls 2

popMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected