MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_dunder_lt

Method test_dunder_lt

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

Source from the content-addressed store, hash-verified

1779 self._assert_unorderable_types(should_raise)
1780
1781 def test_dunder_lt(self):
1782 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1783
1784 # basic set math
1785 eq_(sub_ < super_, True)
1786 eq_(super_ < sub_, False)
1787
1788 # the same sets
1789 eq_(twin1 < twin2, False)
1790 eq_(twin2 < twin1, False)
1791
1792 # totally different sets
1793 eq_(unique1 < unique2, False)
1794 eq_(unique2 < unique1, False)
1795
1796 # not an IdentitySet
1797 def should_raise():
1798 not_an_identity_set = object()
1799 return unique1 < not_an_identity_set
1800
1801 self._assert_unorderable_types(should_raise)
1802
1803 def test_dunder_ge(self):
1804 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