Skip to content

Commit

Permalink
Make first case pass setting code flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Nov 15, 2022
1 parent ac547e6 commit ab422f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ async def _fn3():

def fn3():
return _fn3()

# TODO: Move this to decorator function.
fn3.__code__ = fn3.__code__.replace(
co_flags=fn3.__code__.co_flags | inspect.CO_COROUTINE
)

self.assertTrue(inspect.iscoroutinefunction(fn3))

with self.subTest("Awaitable instance not recongnised."):
Expand Down

0 comments on commit ab422f7

Please sign in to comment.