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

How to use yield in fixture mock instead of request.addfinalizer() #2

Open
kniklas opened this issue Nov 24, 2020 · 1 comment
Open

Comments

@kniklas
Copy link
Owner

kniklas commented Nov 24, 2020

gets fixture Mock uses return statement with request.addfinalizer() instead of yield. The former does not work correctly - yielded fixture is not available for tests!

See: e866f43 and line of code: e866f43#diff-03b04da21521a2d564314ed339e261eb06b17d7f59d4b3985485ab9dfdfc8476R28

@kniklas kniklas changed the title used request.addfinalizer() instead of preferred yield How to use yield in fixture mock instead of request.addfinalizer() Apr 15, 2021
@kniklas
Copy link
Owner Author

kniklas commented Feb 23, 2022

Research on pytest yield / finalizers - if/how it is supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant