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

Method test_invariant_for_the_in_operator

Lib/test/test_collections.py:2276–2280  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2274 self.assertEqual(set(Counter(s)), set(s))
2275
2276 def test_invariant_for_the_in_operator(self):
2277 c = Counter(a=10, b=-2, c=0)
2278 for elem in c:
2279 self.assertTrue(elem in c)
2280 self.assertIn(elem, c)
2281
2282 def test_multiset_operations(self):
2283 # Verify that adding a zero counter will strip zeros and negatives

Callers

nothing calls this directly

Calls 3

CounterClass · 0.90
assertTrueMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected