File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,3 +403,39 @@ def test_there_are_no_exceptions_if_not_tilde_mode_and_in_function_is_return_tru
403403 def function ():
404404 with generator_context :
405405 return True
406+
407+
408+ def test_async_function_with_all_content_in_generator_context ():
409+ @superfunction
410+ def function ():
411+ with generator_context :
412+ return True
413+
414+ assert run (function ()) is None
415+
416+
417+ def test_async_function_with_all_content_in_sync_context ():
418+ @superfunction
419+ def function ():
420+ with sync_context :
421+ return True
422+
423+ assert run (function ()) is None
424+
425+
426+ def test_usual_tilde_function_with_all_content_in_generator_context ():
427+ @superfunction
428+ def function ():
429+ with generator_context :
430+ return True
431+
432+ assert ~ function () is None
433+
434+
435+ def test_usual_tilde_function_with_all_content_in_async_context ():
436+ @superfunction
437+ def function ():
438+ with async_context :
439+ return True
440+
441+ assert ~ function () is None
You can’t perform that action at this time.
0 commit comments