From c9ee5ce8791109df9978b981ccdf30999589d3c7 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Thu, 4 Mar 2021 12:38:49 -0500 Subject: [PATCH] Mark erroring/failing tests --- Lib/test/test_iterlen.py | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/Lib/test/test_iterlen.py b/Lib/test/test_iterlen.py index 41c9752e5..46b470f67 100644 --- a/Lib/test/test_iterlen.py +++ b/Lib/test/test_iterlen.py @@ -86,16 +86,31 @@ class TestXrange(TestInvariantWithoutMutations, unittest.TestCase): def setUp(self): self.it = iter(range(n)) + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + class TestXrangeCustomReversed(TestInvariantWithoutMutations, unittest.TestCase): def setUp(self): self.it = reversed(range(n)) + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + class TestTuple(TestInvariantWithoutMutations, unittest.TestCase): def setUp(self): self.it = iter(tuple(range(n))) + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + ## ------- Types that should not be mutated during iteration ------- class TestDeque(TestTemporarilyImmutable, unittest.TestCase): @@ -105,6 +120,16 @@ class TestDeque(TestTemporarilyImmutable, unittest.TestCase): self.it = iter(d) self.mutate = d.pop + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + class TestDequeReversed(TestTemporarilyImmutable, unittest.TestCase): def setUp(self): @@ -112,6 +137,16 @@ class TestDequeReversed(TestTemporarilyImmutable, unittest.TestCase): self.it = reversed(d) self.mutate = d.pop + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + class TestDictKeys(TestTemporarilyImmutable, unittest.TestCase): def setUp(self): @@ -119,6 +154,11 @@ class TestDictKeys(TestTemporarilyImmutable, unittest.TestCase): self.it = iter(d) self.mutate = d.popitem + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + class TestDictItems(TestTemporarilyImmutable, unittest.TestCase): def setUp(self): @@ -126,6 +166,11 @@ class TestDictItems(TestTemporarilyImmutable, unittest.TestCase): self.it = iter(d.items()) self.mutate = d.popitem + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + class TestDictValues(TestTemporarilyImmutable, unittest.TestCase): def setUp(self): @@ -133,6 +178,11 @@ class TestDictValues(TestTemporarilyImmutable, unittest.TestCase): self.it = iter(d.values()) self.mutate = d.popitem + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + class TestSet(TestTemporarilyImmutable, unittest.TestCase): def setUp(self): @@ -140,6 +190,16 @@ class TestSet(TestTemporarilyImmutable, unittest.TestCase): self.it = iter(d) self.mutate = d.pop + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_immutable_during_iteration(self): + super().test_immutable_during_iteration() + + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + ## ------- Types that can mutate during iteration ------- class TestList(TestInvariantWithoutMutations, unittest.TestCase): @@ -147,6 +207,13 @@ class TestList(TestInvariantWithoutMutations, unittest.TestCase): def setUp(self): self.it = iter(range(n)) + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_mutation(self): d = list(range(n)) it = iter(d) @@ -167,6 +234,13 @@ class TestListReversed(TestInvariantWithoutMutations, unittest.TestCase): def setUp(self): self.it = reversed(range(n)) + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_invariant(self): + super().test_invariant() + + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_mutation(self): d = list(range(n)) it = reversed(d) @@ -210,6 +284,8 @@ class NoneLengthHint(object): class TestLengthHintExceptions(unittest.TestCase): + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_issue1242657(self): self.assertRaises(RuntimeError, list, BadLen()) self.assertRaises(RuntimeError, list, BadLengthHint())