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

Method test_Set

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
validate_comparisonMethod · 0.80
MySetClass · 0.70
assertIsSubclassMethod · 0.45

Tested by

no test coverage detected