|
7 | 7 |
|
8 | 8 | class BoolTest(unittest.TestCase): |
9 | 9 |
|
| 10 | + @unittest.expectedFailure |
10 | 11 | def test_subclass(self): |
11 | 12 | try: |
12 | 13 | class C(bool): |
@@ -49,6 +50,7 @@ def test_float(self): |
49 | 50 | self.assertEqual(float(True), 1.0) |
50 | 51 | self.assertIsNot(float(True), True) |
51 | 52 |
|
| 53 | + @unittest.expectedFailure |
52 | 54 | def test_math(self): |
53 | 55 | self.assertEqual(+False, 0) |
54 | 56 | self.assertIsNot(+False, False) |
@@ -168,6 +170,7 @@ def test_convert(self): |
168 | 170 | self.assertIs(bool(""), False) |
169 | 171 | self.assertIs(bool(), False) |
170 | 172 |
|
| 173 | + @unittest.expectedFailure |
171 | 174 | def test_keyword_args(self): |
172 | 175 | with self.assertRaisesRegex(TypeError, 'keyword argument'): |
173 | 176 | bool(x=10) |
@@ -202,6 +205,7 @@ def test_contains(self): |
202 | 205 | self.assertIs(1 in {}, False) |
203 | 206 | self.assertIs(1 in {1:1}, True) |
204 | 207 |
|
| 208 | + @unittest.expectedFailure |
205 | 209 | def test_string(self): |
206 | 210 | self.assertIs("xyz".endswith("z"), True) |
207 | 211 | self.assertIs("xyz".endswith("x"), False) |
@@ -270,11 +274,13 @@ def test_operator(self): |
270 | 274 | self.assertIs(operator.is_not(True, True), False) |
271 | 275 | self.assertIs(operator.is_not(True, False), True) |
272 | 276 |
|
| 277 | + @unittest.expectedFailure |
273 | 278 | def test_marshal(self): |
274 | 279 | import marshal |
275 | 280 | self.assertIs(marshal.loads(marshal.dumps(True)), True) |
276 | 281 | self.assertIs(marshal.loads(marshal.dumps(False)), False) |
277 | 282 |
|
| 283 | + @unittest.expectedFailure |
278 | 284 | def test_pickle(self): |
279 | 285 | import pickle |
280 | 286 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
@@ -322,6 +328,7 @@ def __len__(self): |
322 | 328 | return -1 |
323 | 329 | self.assertRaises(ValueError, bool, Eggs()) |
324 | 330 |
|
| 331 | + @unittest.expectedFailure |
325 | 332 | def test_from_bytes(self): |
326 | 333 | self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False) |
327 | 334 | self.assertIs(bool.from_bytes(b'abcd', 'little'), True) |
|
0 commit comments