Skip to content

Commit ab422f7

Browse files
committed
Make first case pass setting code flags.
1 parent ac547e6 commit ab422f7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_inspect.py

+6
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ async def _fn3():
210210

211211
def fn3():
212212
return _fn3()
213+
214+
# TODO: Move this to decorator function.
215+
fn3.__code__ = fn3.__code__.replace(
216+
co_flags=fn3.__code__.co_flags | inspect.CO_COROUTINE
217+
)
218+
213219
self.assertTrue(inspect.iscoroutinefunction(fn3))
214220

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

0 commit comments

Comments
 (0)