MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_issuperset

Method test_issuperset

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

Source from the content-addressed store, hash-verified

1864 assert_raises(TypeError, unique1.issubset, not_an_identity_set)
1865
1866 def test_issuperset(self):
1867 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1868
1869 # basic set math
1870 eq_(sub_.issuperset(super_), False)
1871 eq_(super_.issuperset(sub_), True)
1872
1873 # the same sets
1874 eq_(twin1.issuperset(twin2), True)
1875 eq_(twin2.issuperset(twin1), True)
1876
1877 # totally different sets
1878 eq_(unique1.issuperset(unique2), False)
1879 eq_(unique2.issuperset(unique1), False)
1880
1881 # not an IdentitySet
1882 not_an_identity_set = object()
1883 assert_raises(TypeError, unique1.issuperset, not_an_identity_set)
1884
1885 def test_union(self):
1886 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