Skip to content

Commit 8c15799

Browse files
authored
Updated test_contextlib_async.py (#6686)
1 parent e835ce9 commit 8c15799

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Lib/test/test_contextlib_async.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ async def woohoo():
120120
raise ZeroDivisionError()
121121
self.assertEqual(state, [1, 42, 999])
122122

123-
# TODO: RUSTPYTHON
124-
@unittest.expectedFailure
123+
@unittest.expectedFailure # TODO: RUSTPYTHON
125124
async def test_contextmanager_traceback(self):
126125
@asynccontextmanager
127126
async def f():
@@ -253,8 +252,7 @@ async def woohoo():
253252
raise ZeroDivisionError(999)
254253
self.assertEqual(state, [1, 42, 999])
255254

256-
# TODO: RUSTPYTHON
257-
@unittest.expectedFailure
255+
@unittest.expectedFailure # TODO: RUSTPYTHON
258256
async def test_contextmanager_except_stopiter(self):
259257
@asynccontextmanager
260258
async def woohoo():
@@ -535,11 +533,6 @@ def __exit__(self, *exc_details):
535533
('__aexit__', 'cb_suppress = cb(*exc_details)'),
536534
]
537535

538-
# TODO: RUSTPYTHON - no _asyncio module, pure Python Task adds extra frame
539-
@unittest.expectedFailure
540-
def test_exit_exception_traceback(self):
541-
super().test_exit_exception_traceback()
542-
543536
async def test_async_callback(self):
544537
expected = [
545538
((), {}),
@@ -657,8 +650,7 @@ async def __aenter__(self):
657650
await stack.enter_async_context(LacksExit())
658651
self.assertFalse(stack._exit_callbacks)
659652

660-
# TODO: RUSTPYTHON
661-
@unittest.expectedFailure
653+
@unittest.expectedFailure # TODO: RUSTPYTHON
662654
async def test_async_exit_exception_chaining(self):
663655
# Ensure exception chaining matches the reference behaviour
664656
async def raise_exc(exc):
@@ -690,8 +682,7 @@ async def suppress_exc(*exc_details):
690682
self.assertIsInstance(inner_exc, ValueError)
691683
self.assertIsInstance(inner_exc.__context__, ZeroDivisionError)
692684

693-
# TODO: RUSTPYTHON
694-
@unittest.expectedFailure
685+
@unittest.expectedFailure # TODO: RUSTPYTHON
695686
async def test_async_exit_exception_explicit_none_context(self):
696687
# Ensure AsyncExitStack chaining matches actual nested `with` statements
697688
# regarding explicit __context__ = None.
@@ -737,6 +728,10 @@ class Example(object): pass
737728
stack.push_async_exit(cm)
738729
self.assertIs(stack._exit_callbacks[-1][1], cm)
739730

731+
@unittest.expectedFailure # TODO: RUSTPYTHON; - no _asyncio module, pure Python Task adds extra frame
732+
def test_exit_exception_traceback(self):
733+
return super().test_exit_exception_traceback()
734+
740735

741736
class TestAsyncNullcontext(unittest.IsolatedAsyncioTestCase):
742737
async def test_async_nullcontext(self):

0 commit comments

Comments
 (0)