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

Method test_issubset

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

Source from the content-addressed store, hash-verified

1750 self._assert_unorderable_types(should_raise)
1751
1752 def test_issubset(self):
1753 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1754
1755 # basic set math
1756 eq_(sub_.issubset(super_), True)
1757 eq_(super_.issubset(sub_), False)
1758
1759 # the same sets
1760 eq_(twin1.issubset(twin2), True)
1761 eq_(twin2.issubset(twin1), True)
1762
1763 # totally different sets
1764 eq_(unique1.issubset(unique2), False)
1765 eq_(unique2.issubset(unique1), False)
1766
1767 # not an IdentitySet
1768 not_an_identity_set = object()
1769 assert_raises(TypeError, unique1.issubset, not_an_identity_set)
1770
1771 def test_issuperset(self):
1772 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()

Callers

nothing calls this directly

Calls 4

_create_setsMethod · 0.95
eq_Function · 0.90
assert_raisesFunction · 0.90
issubsetMethod · 0.45

Tested by

no test coverage detected