From 98f2f871cdd1e77f9d72daceda58849e0adf2c8c Mon Sep 17 00:00:00 2001 From: snowapril Date: Mon, 6 Sep 2021 18:23:30 +0900 Subject: [PATCH] add annotations for making test success Signed-off-by: snowapril --- Lib/test/test_dictviews.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py index 3c28285d3..a43504907 100644 --- a/Lib/test/test_dictviews.py +++ b/Lib/test/test_dictviews.py @@ -6,6 +6,8 @@ import unittest class DictSetTest(unittest.TestCase): + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_constructors_not_callable(self): kt = type({}.keys()) self.assertRaises(TypeError, kt, {}) @@ -17,6 +19,8 @@ class DictSetTest(unittest.TestCase): self.assertRaises(TypeError, vt, {}) self.assertRaises(TypeError, vt) + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_dict_keys(self): d = {1: 10, "a": "ABC"} keys = d.keys() @@ -37,6 +41,8 @@ class DictSetTest(unittest.TestCase): del e["a"] self.assertNotEqual(d.keys(), e.keys()) + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_dict_items(self): d = {1: 10, "a": "ABC"} items = d.items() @@ -60,6 +66,8 @@ class DictSetTest(unittest.TestCase): e["a"] = "def" self.assertNotEqual(d.items(), e.items()) + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_dict_mixed_keys_items(self): d = {(1, 1): 11, (2, 2): 22} e = {1: 1, 2: 2} @@ -72,6 +80,7 @@ class DictSetTest(unittest.TestCase): self.assertEqual(set(values), {10, "ABC"}) self.assertEqual(len(values), 2) + @unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_keys' and 'dict_keys'") def test_dict_repr(self): d = {1: 10, "a": "ABC"} self.assertIsInstance(repr(d), str) @@ -88,6 +97,7 @@ class DictSetTest(unittest.TestCase): self.assertTrue(r == "dict_values(['ABC', 10])" or r == "dict_values([10, 'ABC'])") + @unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_items' and 'dict_items'") def test_keys_set_operations(self): d1 = {'a': 1, 'b': 2} d2 = {'b': 3, 'c': 2} @@ -144,6 +154,7 @@ class DictSetTest(unittest.TestCase): self.assertTrue(de.keys().isdisjoint(de.keys())) self.assertTrue(de.keys().isdisjoint([1])) + @unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_items' and 'dict_items'") def test_items_set_operations(self): d1 = {'a': 1, 'b': 2} d2 = {'a': 2, 'b': 2} @@ -213,18 +224,24 @@ class DictSetTest(unittest.TestCase): # Again. self.assertIsInstance(r, str) + # TODO: RUSTPYTHON + @unittest.expectedFailure + @unittest.skipIf(sys.platform == "win32", "thread 'main' has overflowed its stack") def test_deeply_nested_repr(self): d = {} for i in range(sys.getrecursionlimit() + 100): d = {42: d.values()} self.assertRaises(RecursionError, repr, d) + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_copy(self): d = {1: 10, "a": "ABC"} self.assertRaises(TypeError, copy.copy, d.keys()) self.assertRaises(TypeError, copy.copy, d.values()) self.assertRaises(TypeError, copy.copy, d.items()) + @unittest.skip("TODO: RUSTPYTHON, DictSetTest.test_compare_error..Exc") def test_compare_error(self): class Exc(Exception): pass