MCPcopy Index your code
hub / github.com/python/cpython / test_sub

Method test_sub

Lib/test/test_set.py:172–181  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 self.assertEqual(self.thetype('abcba').difference(C('a'), C('b')), set('c'))
171
172 def test_sub(self):
173 i = self.s.difference(self.otherword)
174 self.assertEqual(self.s - set(self.otherword), i)
175 self.assertEqual(self.s - frozenset(self.otherword), i)
176 try:
177 self.s - self.otherword
178 except TypeError:
179 pass
180 else:
181 self.fail("s-t did not screen-out general iterables")
182
183 def test_symmetric_difference(self):
184 i = self.s.symmetric_difference(self.otherword)

Callers

nothing calls this directly

Calls 4

setFunction · 0.85
differenceMethod · 0.80
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected