Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

fix: async system tests regression#1086

Merged
sai-sunder-s merged 1 commit intogoogleapis:mainfrom
clundin25:fix-system-tests
Jul 22, 2022
Merged

fix: async system tests regression#1086
sai-sunder-s merged 1 commit intogoogleapis:mainfrom
clundin25:fix-system-tests

Conversation

@clundin25
Copy link
Copy Markdown
Contributor

@clundin25 clundin25 commented Jul 21, 2022

Currently the system tests were failing with a message "TypeError:
'async_generator' object is not callable".

This is because newer versions of pytest_asyncio uses "strict" mode
by default which does not automatically convert fixtures to async
fixtures in async test cases. This became an issue as of pytest_asyncio
version 19.

The solution is to either switch the mode to "auto" in the nox
commandline or to mark the async fixtures as async fixtures.

I've opted for the second to avoid making this hard to discover.

@clundin25 clundin25 requested a review from a team July 21, 2022 20:23
@clundin25 clundin25 force-pushed the fix-system-tests branch 4 times, most recently from 1b50adb to d22b2f8 Compare July 21, 2022 21:37
@clundin25 clundin25 changed the title fix: Async system tests were not unwrapping async_generators fix: async system tests regression Jul 21, 2022
@sai-sunder-s sai-sunder-s added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 21, 2022
@sai-sunder-s sai-sunder-s added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2022
Currently the system tests were failing with a message "TypeError:
'async_generator' object is not callable".

This is because newer versions of pytest_asyncio uses "strict" mode
by default which does not automatically convert fixtures to async
fixtures in async test cases. This became an issue as of pytest_asyncio
version 19.

The solution is to either switch the mode to "auto" in the nox
commandline or to mark the async fixtures as async fixtures.

I've opted for the second to avoid making this hard to discover.
@alexander-fenster alexander-fenster added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 22, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 22, 2022
@sai-sunder-s sai-sunder-s merged commit 29d248a into googleapis:main Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants