MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_dunder_le

Method test_dunder_le

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

Source from the content-addressed store, hash-verified

1757 eq_(unique1 != not_an_identity_set, True)
1758
1759 def test_dunder_le(self):
1760 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1761
1762 # basic set math
1763 eq_(sub_ <= super_, True)
1764 eq_(super_ <= sub_, False)
1765
1766 # the same sets
1767 eq_(twin1 <= twin2, True)
1768 eq_(twin2 <= twin1, True)
1769
1770 # totally different sets
1771 eq_(unique1 <= unique2, False)
1772 eq_(unique2 <= unique1, False)
1773
1774 # not an IdentitySet
1775 def should_raise():
1776 not_an_identity_set = object()
1777 return unique1 <= not_an_identity_set
1778
1779 self._assert_unorderable_types(should_raise)
1780
1781 def test_dunder_lt(self):
1782 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