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

Method test_or

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

Source from the content-addressed store, hash-verified

98 self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2]))
99
100 def test_or(self):
101 i = self.s.union(self.otherword)
102 self.assertEqual(self.s | set(self.otherword), i)
103 self.assertEqual(self.s | frozenset(self.otherword), i)
104 try:
105 self.s | self.otherword
106 except TypeError:
107 pass
108 else:
109 self.fail("s|t did not screen-out general iterables")
110
111 def test_intersection(self):
112 i = self.s.intersection(self.otherword)

Callers

nothing calls this directly

Calls 4

setFunction · 0.85
unionMethod · 0.80
assertEqualMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected