MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_dunder_lt

Method test_dunder_lt

test/base/test_utils.py:1686–1706  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1684 self._assert_unorderable_types(should_raise)
1685
1686 def test_dunder_lt(self):
1687 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1688
1689 # basic set math
1690 eq_(sub_ < super_, True)
1691 eq_(super_ < sub_, False)
1692
1693 # the same sets
1694 eq_(twin1 < twin2, False)
1695 eq_(twin2 < twin1, False)
1696
1697 # totally different sets
1698 eq_(unique1 < unique2, False)
1699 eq_(unique2 < unique1, False)
1700
1701 # not an IdentitySet
1702 def should_raise():
1703 not_an_identity_set = object()
1704 return unique1 < not_an_identity_set
1705
1706 self._assert_unorderable_types(should_raise)
1707
1708 def test_dunder_ge(self):
1709 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()

Callers

nothing calls this directly

Calls 3

_create_setsMethod · 0.95
eq_Function · 0.90

Tested by

no test coverage detected