Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-94808: [coverage] Add an asynchronous generator test #97672

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

zhanpon
Copy link
Contributor

@zhanpon zhanpon commented Sep 30, 2022

The test covers the following code path:

cpython/Objects/genobject.c

Lines 1780 to 1785 in ff54dd9

if (o->ags_gen->ag_running_async) {
PyErr_SetString(
PyExc_RuntimeError,
"anext(): asynchronous generator is already running");
return NULL;
}

Cover the error condition of 'asynchronous generator is already running'
@bedevere-bot bedevere-bot added awaiting review tests Tests in the Lib/test dir labels Sep 30, 2022
@mdboom
Copy link
Contributor

mdboom commented Sep 30, 2022

Thanks for improving our test coverage! Can you point to the specific lines that this adds coverage for?

@zhanpon
Copy link
Contributor Author

zhanpon commented Sep 30, 2022

@mdboom Thank you for the comment! I've added it to the PR description.

@kumaraditya303
Copy link
Contributor

Thanks.

@zhanpon zhanpon deleted the improve-asyncgen-coverage branch November 24, 2022 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants