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

Method test_Set

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

Source from the content-addressed store, hash-verified

1419 # as real base classes or mix-in classes.
1420
1421 def test_Set(self):
1422 for sample in [set, frozenset]:
1423 self.assertIsInstance(sample(), Set)
1424 self.assertIsSubclass(sample, Set)
1425 self.validate_abstract_methods(Set, '__contains__', '__iter__', '__len__')
1426 class MySet(Set):
1427 def __contains__(self, x):
1428 return False
1429 def __len__(self):
1430 return 0
1431 def __iter__(self):
1432 return iter([])
1433 self.validate_comparison(MySet())
1434
1435 def test_hash_Set(self):
1436 class OneTwoThreeSet(Set):

Callers

nothing calls this directly

Calls 6

sampleFunction · 0.85
assertIsInstanceMethod · 0.80
assertIsSubclassMethod · 0.80
validate_comparisonMethod · 0.80
MySetClass · 0.70

Tested by

no test coverage detected