(pytester: Pytester)
| 92 | |
| 93 | |
| 94 | def test_is_generator_asyncio(pytester: Pytester) -> None: |
| 95 | pytester.makepyfile( |
| 96 | """ |
| 97 | from _pytest.compat import is_generator |
| 98 | import asyncio |
| 99 | @asyncio.coroutine |
| 100 | def baz(): |
| 101 | yield from [1,2,3] |
| 102 | |
| 103 | def test_is_generator_asyncio(): |
| 104 | assert not is_generator(baz) |
| 105 | """ |
| 106 | ) |
| 107 | # avoid importing asyncio into pytest's own process, |
| 108 | # which in turn imports logging (#8) |
| 109 | result = pytester.runpytest_subprocess() |
| 110 | result.stdout.fnmatch_lines(["*1 passed*"]) |
| 111 | |
| 112 | |
| 113 | def test_is_generator_async_syntax(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected