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

Method test_sets

Lib/test/test_compare.py:481–496  ·  view source on GitHub ↗

Compare set and frozenset.

(self)

Source from the content-addressed store, hash-verified

479 self.assert_total_order(ba1, bs2, -1)
480
481 def test_sets(self):
482 """Compare set and frozenset."""
483 s1 = {1, 2}
484 s2 = {1, 2, 3}
485 self.assert_total_order(s1, s1, 0)
486 self.assert_total_order(s1, s2, -1)
487
488 f1 = frozenset(s1)
489 f2 = frozenset(s2)
490 self.assert_total_order(f1, f1, 0)
491 self.assert_total_order(f1, f2, -1)
492
493 self.assert_total_order(s1, f1, 0)
494 self.assert_total_order(s1, f2, -1)
495 self.assert_total_order(f1, s1, 0)
496 self.assert_total_order(f1, s2, -1)
497
498 def test_mappings(self):
499 """ Compare dict.

Callers

nothing calls this directly

Calls 1

assert_total_orderMethod · 0.95

Tested by

no test coverage detected