From 003f9dbf21970c571d4b24ea48b94e5e2cf16c15 Mon Sep 17 00:00:00 2001 From: Jeong Yunwon Date: Mon, 18 Jul 2022 02:08:47 +0900 Subject: [PATCH] adjust failing markers for list tests --- Lib/test/list_tests.py | 5 +++++ Lib/test/test_list.py | 11 +++++++++++ Lib/test/test_userlist.py | 10 ++++++++++ 3 files changed, 26 insertions(+) diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index f7eea88c5..65a5118e4 100644 --- a/Lib/test/list_tests.py +++ b/Lib/test/list_tests.py @@ -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]) diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py index 54c827498..419eb945b 100644 --- a/Lib/test/test_list.py +++ b/Lib/test/test_list.py @@ -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() diff --git a/Lib/test/test_userlist.py b/Lib/test/test_userlist.py index 3b30cdc8e..9ed682afe 100644 --- a/Lib/test/test_userlist.py +++ b/Lib/test/test_userlist.py @@ -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")