@@ -40,8 +40,6 @@ async def __aexit__(self, *args):
4040 manager = DefaultAsyncContextManager ()
4141 manager .var = 42
4242
43- # TODO: RUSTPYTHON
44- @unittest .expectedFailure
4543 async def test_async_gen_propagates_generator_exit (self ):
4644 # A regression test for https://bugs.python.org/issue33786.
4745
@@ -94,8 +92,6 @@ class NoneAexit(ManagerFromScratch):
9492
9593class AsyncContextManagerTestCase (unittest .IsolatedAsyncioTestCase ):
9694
97- # TODO: RUSTPYTHON
98- @unittest .expectedFailure
9995 async def test_contextmanager_plain (self ):
10096 state = []
10197 @asynccontextmanager
@@ -109,8 +105,6 @@ async def woohoo():
109105 state .append (x )
110106 self .assertEqual (state , [1 , 42 , 999 ])
111107
112- # TODO: RUSTPYTHON
113- @unittest .expectedFailure
114108 async def test_contextmanager_finally (self ):
115109 state = []
116110 @asynccontextmanager
@@ -185,8 +179,6 @@ class StopAsyncIterationSubclass(StopAsyncIteration):
185179 self .assertEqual (frames [0 ].name , 'test_contextmanager_traceback' )
186180 self .assertEqual (frames [0 ].line , 'raise stop_exc' )
187181
188- # TODO: RUSTPYTHON
189- @unittest .expectedFailure
190182 async def test_contextmanager_no_reraise (self ):
191183 @asynccontextmanager
192184 async def whee ():
@@ -196,8 +188,6 @@ async def whee():
196188 # Calling __aexit__ should not result in an exception
197189 self .assertFalse (await ctx .__aexit__ (TypeError , TypeError ("foo" ), None ))
198190
199- # TODO: RUSTPYTHON
200- @unittest .expectedFailure
201191 async def test_contextmanager_trap_yield_after_throw (self ):
202192 @asynccontextmanager
203193 async def whoo ():
@@ -213,8 +203,6 @@ async def whoo():
213203 # The "gen" attribute is an implementation detail.
214204 self .assertFalse (ctx .gen .ag_suspended )
215205
216- # TODO: RUSTPYTHON
217- @unittest .expectedFailure
218206 async def test_contextmanager_trap_no_yield (self ):
219207 @asynccontextmanager
220208 async def whoo ():
@@ -224,8 +212,6 @@ async def whoo():
224212 with self .assertRaises (RuntimeError ):
225213 await ctx .__aenter__ ()
226214
227- # TODO: RUSTPYTHON
228- @unittest .expectedFailure
229215 async def test_contextmanager_trap_second_yield (self ):
230216 @asynccontextmanager
231217 async def whoo ():
@@ -239,8 +225,6 @@ async def whoo():
239225 # The "gen" attribute is an implementation detail.
240226 self .assertFalse (ctx .gen .ag_suspended )
241227
242- # TODO: RUSTPYTHON
243- @unittest .expectedFailure
244228 async def test_contextmanager_non_normalised (self ):
245229 @asynccontextmanager
246230 async def whoo ():
@@ -254,8 +238,6 @@ async def whoo():
254238 with self .assertRaises (SyntaxError ):
255239 await ctx .__aexit__ (RuntimeError , None , None )
256240
257- # TODO: RUSTPYTHON
258- @unittest .expectedFailure
259241 async def test_contextmanager_except (self ):
260242 state = []
261243 @asynccontextmanager
@@ -301,8 +283,6 @@ class StopAsyncIterationSubclass(StopAsyncIteration):
301283 else :
302284 self .fail (f'{ stop_exc } was suppressed' )
303285
304- # TODO: RUSTPYTHON
305- @unittest .expectedFailure
306286 async def test_contextmanager_wrap_runtimeerror (self ):
307287 @asynccontextmanager
308288 async def woohoo ():
@@ -346,17 +326,13 @@ def test_contextmanager_doc_attrib(self):
346326 baz = self ._create_contextmanager_attribs ()
347327 self .assertEqual (baz .__doc__ , "Whee!" )
348328
349- # TODO: RUSTPYTHON
350- @unittest .expectedFailure
351329 @support .requires_docstrings
352330 async def test_instance_docstring_given_cm_docstring (self ):
353331 baz = self ._create_contextmanager_attribs ()(None )
354332 self .assertEqual (baz .__doc__ , "Whee!" )
355333 async with baz :
356334 pass # suppress warning
357335
358- # TODO: RUSTPYTHON
359- @unittest .expectedFailure
360336 async def test_keywords (self ):
361337 # Ensure no keyword arguments are inhibited
362338 @asynccontextmanager
@@ -365,8 +341,6 @@ async def woohoo(self, func, args, kwds):
365341 async with woohoo (self = 11 , func = 22 , args = 33 , kwds = 44 ) as target :
366342 self .assertEqual (target , (11 , 22 , 33 , 44 ))
367343
368- # TODO: RUSTPYTHON
369- @unittest .expectedFailure
370344 async def test_recursive (self ):
371345 depth = 0
372346 ncols = 0
@@ -393,8 +367,6 @@ async def recursive():
393367 self .assertEqual (ncols , 10 )
394368 self .assertEqual (depth , 0 )
395369
396- # TODO: RUSTPYTHON
397- @unittest .expectedFailure
398370 async def test_decorator (self ):
399371 entered = False
400372
@@ -413,8 +385,6 @@ async def test():
413385 await test ()
414386 self .assertFalse (entered )
415387
416- # TODO: RUSTPYTHON
417- @unittest .expectedFailure
418388 async def test_decorator_with_exception (self ):
419389 entered = False
420390
@@ -437,8 +407,6 @@ async def test():
437407 await test ()
438408 self .assertFalse (entered )
439409
440- # TODO: RUSTPYTHON
441- @unittest .expectedFailure
442410 async def test_decorating_method (self ):
443411
444412 @asynccontextmanager
0 commit comments