MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_is_generator_async_syntax

Function test_is_generator_async_syntax

testing/test_compat.py:113–129  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

111
112
113def test_is_generator_async_syntax(pytester: Pytester) -> None:
114 pytester.makepyfile(
115 """
116 from _pytest.compat import is_generator
117 def test_is_generator_py35():
118 async def foo():
119 await foo()
120
121 async def bar():
122 pass
123
124 assert not is_generator(foo)
125 assert not is_generator(bar)
126 """
127 )
128 result = pytester.runpytest()
129 result.stdout.fnmatch_lines(["*1 passed*"])
130
131
132def test_is_generator_async_gen_syntax(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected