(self)
| 314 | self.assertEqual(operator.sub(5, 2), 3) |
| 315 | |
| 316 | def test_truth(self): |
| 317 | operator = self.module |
| 318 | class C(object): |
| 319 | def __bool__(self): |
| 320 | raise SyntaxError |
| 321 | self.assertRaises(TypeError, operator.truth) |
| 322 | self.assertRaises(SyntaxError, operator.truth, C()) |
| 323 | self.assertTrue(operator.truth(5)) |
| 324 | self.assertTrue(operator.truth([0])) |
| 325 | self.assertFalse(operator.truth(0)) |
| 326 | self.assertFalse(operator.truth([])) |
| 327 | |
| 328 | def test_bitwise_xor(self): |
| 329 | operator = self.module |
nothing calls this directly
no test coverage detected