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

Method test_issuperset

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

Source from the content-addressed store, hash-verified

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()
1773
1774 # basic set math
1775 eq_(sub_.issuperset(super_), False)
1776 eq_(super_.issuperset(sub_), True)
1777
1778 # the same sets
1779 eq_(twin1.issuperset(twin2), True)
1780 eq_(twin2.issuperset(twin1), True)
1781
1782 # totally different sets
1783 eq_(unique1.issuperset(unique2), False)
1784 eq_(unique2.issuperset(unique1), False)
1785
1786 # not an IdentitySet
1787 not_an_identity_set = object()
1788 assert_raises(TypeError, unique1.issuperset, not_an_identity_set)
1789
1790 def test_union(self):
1791 super_, sub_, twin1, twin2, _, _ = self._create_sets()

Callers

nothing calls this directly

Calls 4

_create_setsMethod · 0.95
eq_Function · 0.90
assert_raisesFunction · 0.90
issupersetMethod · 0.45

Tested by

no test coverage detected