|
9 | 9 | filter, map, zip) |
10 | 10 |
|
11 | 11 | from future.utils import PY3, exec_, native_str, implements_iterator |
12 | | -from future.tests.base import unittest, skip26 |
| 12 | +from future.tests.base import unittest, skip26, expectedFailurePY2 |
13 | 13 |
|
14 | 14 | import sys |
15 | 15 | import textwrap |
@@ -91,7 +91,7 @@ def test_isinstance_str(self): |
91 | 91 | self.assertTrue(isinstance(u'string', str)) |
92 | 92 | self.assertFalse(isinstance(u'string', bytes)) |
93 | 93 |
|
94 | | - @unittest.expectedFailure |
| 94 | + @expectedFailurePY2 |
95 | 95 | def test_type(self): |
96 | 96 | """ |
97 | 97 | The following fails when passed a unicode string on Python |
@@ -855,7 +855,7 @@ def badfunc(): |
855 | 855 | self.assertEqual(list(filter(lambda x: x>=3, (1, 2, 3, 4))), [3, 4]) |
856 | 856 | self.assertRaises(TypeError, list, filter(42, (1, 2))) |
857 | 857 |
|
858 | | - @unittest.expectedFailure |
| 858 | + @expectedFailurePY2 |
859 | 859 | def test_filter_pickle(self): |
860 | 860 | f1 = filter(filter_char, "abcdeabcde") |
861 | 861 | f2 = filter(filter_char, "abcdeabcde") |
@@ -1058,7 +1058,7 @@ def badfunc(x): |
1058 | 1058 | raise RuntimeError |
1059 | 1059 | self.assertRaises(RuntimeError, list, map(badfunc, range(5))) |
1060 | 1060 |
|
1061 | | - @unittest.expectedFailure |
| 1061 | + @expectedFailurePY2 |
1062 | 1062 | def test_map_pickle(self): |
1063 | 1063 | m1 = map(map_char, "Is this the real life?") |
1064 | 1064 | m2 = map(map_char, "Is this the real life?") |
@@ -1425,7 +1425,7 @@ def test_repr(self): |
1425 | 1425 | a[0] = a |
1426 | 1426 | self.assertEqual(repr(a), '{0: {...}}') |
1427 | 1427 |
|
1428 | | - @unittest.expectedFailure |
| 1428 | + @expectedFailurePY2 |
1429 | 1429 | def test_round(self): |
1430 | 1430 | self.assertEqual(round(0.0), 0.0) |
1431 | 1431 | # Was: self.assertEqual(type(round(0.0)), int) |
@@ -1643,7 +1643,7 @@ def __getitem__(self, i): |
1643 | 1643 | return i |
1644 | 1644 | self.assertRaises(ValueError, list, zip(BadSeq(), BadSeq())) |
1645 | 1645 |
|
1646 | | - @unittest.expectedFailure |
| 1646 | + @expectedFailurePY2 |
1647 | 1647 | def test_zip_pickle(self): |
1648 | 1648 | a = (1, 2, 3) |
1649 | 1649 | b = (4, 5, 6) |
|
0 commit comments