(self)
| 79 | self.assertIn(self.thetype(self.letters), s) |
| 80 | |
| 81 | def test_union(self): |
| 82 | u = self.s.union(self.otherword) |
| 83 | for c in self.letters: |
| 84 | self.assertEqual(c in u, c in self.d or c in self.otherword) |
| 85 | self.assertEqual(self.s, self.thetype(self.word)) |
| 86 | self.assertEqual(type(u), self.basetype) |
| 87 | self.assertRaises(PassThru, self.s.union, check_pass_thru()) |
| 88 | self.assertRaises(TypeError, self.s.union, [[]]) |
| 89 | for C in set, frozenset, dict.fromkeys, str, list, tuple: |
| 90 | self.assertEqual(self.thetype('abcba').union(C('cdc')), set('abcd')) |
| 91 | self.assertEqual(self.thetype('abcba').union(C('efgfe')), set('abcefg')) |
| 92 | self.assertEqual(self.thetype('abcba').union(C('ccb')), set('abc')) |
| 93 | self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef')) |
| 94 | self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg')) |
| 95 | |
| 96 | # Issue #6573 |
| 97 | x = self.thetype() |
| 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) |
nothing calls this directly
no test coverage detected