MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_issubset

Method test_issubset

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

Source from the content-addressed store, hash-verified

1845 self._assert_unorderable_types(should_raise)
1846
1847 def test_issubset(self):
1848 super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets()
1849
1850 # basic set math
1851 eq_(sub_.issubset(super_), True)
1852 eq_(super_.issubset(sub_), False)
1853
1854 # the same sets
1855 eq_(twin1.issubset(twin2), True)
1856 eq_(twin2.issubset(twin1), True)
1857
1858 # totally different sets
1859 eq_(unique1.issubset(unique2), False)
1860 eq_(unique2.issubset(unique1), False)
1861
1862 # not an IdentitySet
1863 not_an_identity_set = object()
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()

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