mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
test: remove expectedFailure annotations
By implement general PyReverseSequenceIterator and make PyStr to use it, now three tests fixed. Signed-off-by: snowapril <sinjihng@gmail.com>
This commit is contained in:
1 parent
aa82a34b4c
commit
aac16f122e
2 files changed
-6
No files matched your search
@@ -172,8 +172,6 @@ class TestReversed(unittest.TestCase, PickleTest):
|
||||
x = range(1)
|
||||
self.assertEqual(type(reversed(x)), type(iter(x)))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_len(self):
|
||||
for s in ('hello', tuple('hello'), list('hello'), range(5)):
|
||||
self.assertEqual(operator.length_hint(reversed(s)), len(s))
|
||||
@@ -243,8 +241,6 @@ class TestReversed(unittest.TestCase, PickleTest):
|
||||
b = Blocked()
|
||||
self.assertRaises(TypeError, reversed, b)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_pickle(self):
|
||||
for data in 'abc', range(5), tuple(enumerate('abc')), range(1,17,5):
|
||||
self.check_pickle(reversed(data), list(data)[::-1])
|
||||
|
||||
@@ -361,8 +361,6 @@ class TupleTest(seq_tests.CommonTest):
|
||||
d = pickle.dumps(it, proto)
|
||||
self.assertEqual(self.type2test(it), self.type2test(data)[1:])
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_reversed_pickle(self):
|
||||
data = self.type2test([4, 5, 6, 7])
|
||||
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||
|
||||
Reference in new issue
Block a user