(self)
| 162 | self.assertRaises(TypeError, operator.concat, 13, 29) |
| 163 | |
| 164 | def test_countOf(self): |
| 165 | operator = self.module |
| 166 | self.assertRaises(TypeError, operator.countOf) |
| 167 | self.assertRaises(TypeError, operator.countOf, None, None) |
| 168 | self.assertRaises(ZeroDivisionError, operator.countOf, BadIterable(), 1) |
| 169 | self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 3), 1) |
| 170 | self.assertEqual(operator.countOf([1, 2, 1, 3, 1, 4], 5), 0) |
| 171 | # is but not == |
| 172 | nan = float("nan") |
| 173 | self.assertEqual(operator.countOf([nan, nan, 21], nan), 2) |
| 174 | # == but not is |
| 175 | self.assertEqual(operator.countOf([{}, 1, {}, 2], {}), 2) |
| 176 | |
| 177 | def test_delitem(self): |
| 178 | operator = self.module |
nothing calls this directly
no test coverage detected