adjust failing markers for list tests

This commit is contained in:
Jeong Yunwon committed 2022-07-18 03:53:29 +09:00
1 parent 5b18683240
commit 003f9dbf21
3 files changed
+26

No files matched your search

+5
View File
@@ -2,6 +2,7 @@
Tests common to list and UserList.UserList
"""
import unittest
import sys
import os
from functools import cmp_to_key
@@ -303,6 +304,8 @@ class CommonTest(seq_tests.CommonTest):
self.assertRaises(TypeError, a.pop, 42, 42)
a = self.type2test([0, 10, 20, 30, 40])
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_remove(self):
a = self.type2test([0, 0, 1])
a.remove(1)
@@ -362,6 +365,8 @@ class CommonTest(seq_tests.CommonTest):
# verify that original order and values are retained.
self.assertIs(x, y)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_index(self):
super().test_index()
a = self.type2test([-2, -1, 0, 0, 1, 2])
+11
View File
@@ -164,6 +164,7 @@ class ListTest(list_tests.CommonTest):
with self.assertRaises(TypeError):
(3,) + L([1,2])
@unittest.skip("TODO: RUSTPYTHON; hang")
def test_equal_operator_modifying_operand(self):
# test fix for seg fault reported in bpo-38588 part 2.
class X:
@@ -197,6 +198,7 @@ class ListTest(list_tests.CommonTest):
self.assertEqual(iter_size, sys.getsizeof(list([0] * 10)))
self.assertEqual(iter_size, sys.getsizeof(list(range(10))))
@unittest.skip("TODO: RUSTPYTHON; hang")
def test_count_index_remove_crashes(self):
# bpo-38610: The count(), index(), and remove() methods were not
# holding strong references to list elements while calling
@@ -229,6 +231,15 @@ class ListTest(list_tests.CommonTest):
lst = [X(), X()]
X() in lst
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_count(self): # XXX: RUSTPYTHON; the method also need to be removed when done
super().test_count()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contains_fake(self): # XXX: RUSTPYTHON; the method also need to be removed when done
super().test_contains_fake()
if __name__ == "__main__":
unittest.main()
+10
View File
@@ -11,6 +11,16 @@ class UserListTest(list_tests.CommonTest):
def test_init(self):
super().test_init()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_contains_fake(self): # XXX: RUSTPYTHON; the method also need to be removed when done
super().test_contains_fake()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_count(self): # XXX: RUSTPYTHON; the method also need to be removed when done
super().test_count()
# TODO: RUSTPYTHON, parent method is marked but this version passes
import sys
@unittest.skipIf(sys.platform == "win32", "TODO: RUSTPYTHON, unexpectedly panics somewhere")