Skip to content

Commit 5d6a48b

Browse files
committed
Mark failing tests of test_contextlib.py
1 parent df48df5 commit 5d6a48b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Lib/test/test_contextlib.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def woohoo():
8888
raise ZeroDivisionError()
8989
self.assertEqual(state, [1, 42, 999])
9090

91+
# TODO: RUSTPYTHON
92+
@unittest.expectedFailure
9193
def test_contextmanager_traceback(self):
9294
@contextmanager
9395
def f():
@@ -543,6 +545,8 @@ def method(self, a, b, c=None):
543545
self.assertEqual(test.b, 2)
544546

545547

548+
# TODO: RUSTPYTHON
549+
@unittest.expectedFailure
546550
def test_typo_enter(self):
547551
class mycontext(ContextDecorator):
548552
def __unter__(self):
@@ -555,6 +559,8 @@ def __exit__(self, *exc):
555559
pass
556560

557561

562+
# TODO: RUSTPYTHON
563+
@unittest.expectedFailure
558564
def test_typo_exit(self):
559565
class mycontext(ContextDecorator):
560566
def __enter__(self):
@@ -722,6 +728,8 @@ def _exit():
722728
result.append(2)
723729
self.assertEqual(result, [1, 2, 3, 4])
724730

731+
# TODO: RUSTPYTHON
732+
@unittest.expectedFailure
725733
def test_enter_context_errors(self):
726734
class LacksEnterAndExit:
727735
pass
@@ -776,6 +784,8 @@ def test_exit_suppress(self):
776784
stack.push(lambda *exc: True)
777785
1/0
778786

787+
# TODO: RUSTPYTHON
788+
@unittest.expectedFailure
779789
def test_exit_exception_traceback(self):
780790
# This test captures the current behavior of ExitStack so that we know
781791
# if we ever unintendedly change it. It is not a statement of what the
@@ -889,6 +899,8 @@ def suppress_exc(*exc_details):
889899
self.assertIsInstance(inner_exc, ValueError)
890900
self.assertIsInstance(inner_exc.__context__, ZeroDivisionError)
891901

902+
# TODO: RUSTPYTHON
903+
@unittest.expectedFailure
892904
def test_exit_exception_explicit_none_context(self):
893905
# Ensure ExitStack chaining matches actual nested `with` statements
894906
# regarding explicit __context__ = None.
@@ -1035,6 +1047,8 @@ def test_excessive_nesting(self):
10351047
for i in range(10000):
10361048
stack.callback(int)
10371049

1050+
# TODO: RUSTPYTHON
1051+
@unittest.expectedFailure
10381052
def test_instance_bypass(self):
10391053
class Example(object): pass
10401054
cm = Example()
@@ -1220,6 +1234,8 @@ def make_relative_path(self, *parts):
12201234
*parts,
12211235
)
12221236

1237+
# TODO: RUSTPYTHON
1238+
@unittest.expectedFailure
12231239
def test_simple(self):
12241240
old_cwd = os.getcwd()
12251241
target = self.make_relative_path('data')
@@ -1229,6 +1245,8 @@ def test_simple(self):
12291245
self.assertEqual(os.getcwd(), target)
12301246
self.assertEqual(os.getcwd(), old_cwd)
12311247

1248+
# TODO: RUSTPYTHON
1249+
@unittest.expectedFailure
12321250
def test_reentrant(self):
12331251
old_cwd = os.getcwd()
12341252
target1 = self.make_relative_path('data')
@@ -1246,6 +1264,8 @@ def test_reentrant(self):
12461264
self.assertEqual(os.getcwd(), target1)
12471265
self.assertEqual(os.getcwd(), old_cwd)
12481266

1267+
# TODO: RUSTPYTHON
1268+
@unittest.expectedFailure
12491269
def test_exception(self):
12501270
old_cwd = os.getcwd()
12511271
target = self.make_relative_path('data')

0 commit comments

Comments
 (0)