Skip to content

[WIP] Dependent async fixture failures #90

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

Merged
merged 3 commits into from
May 20, 2020

Conversation

cdunklau
Copy link
Collaborator

@cdunklau cdunklau commented Feb 29, 2020

It looks like using an async fixture in another async fixture doesn't work. Here are some tests that show the problem. cc @altendky

@altendky
Copy link
Member

altendky commented Mar 1, 2020

I don't have anything remotely working but I do think I'm on a useful path that will be much more correct to pytest.

@altendky
Copy link
Member

altendky commented Mar 1, 2020

Would you like me to commandeer this branch and PR tomorrow? Or make my own.

@cdunklau
Copy link
Collaborator Author

cdunklau commented Mar 1, 2020 via email

@cdunklau
Copy link
Collaborator Author

cdunklau commented Mar 1, 2020

Oh yeah, you could just branch off this and PR against my PR. That's probably cleaner.

@cdunklau
Copy link
Collaborator Author

cdunklau commented Mar 1, 2020

Hmm, so the issue isn't just when you return/yield a function from the parent fixture, it's overall. Will add more (simpler) tests.

@cdunklau
Copy link
Collaborator Author

cdunklau commented Mar 1, 2020

I don't really see the usefulness of the more complex tests. They should probably be removed.

@altendky
Copy link
Member

altendky commented Mar 1, 2020

I had the new tests passing. I'm not totally sure what I'm doing but I think I just need to get the teardown for async yield fixtures working again. I'm thinking this might also allow for non-function scope async fixtures... But I haven't tested anything in that direction yet.

@altendky
Copy link
Member

altendky commented Mar 1, 2020

Pushed my first effort in #91

@altendky altendky changed the title Dependent async fixture failures [WIP] Dependent async fixture failures Mar 4, 2020
@altendky altendky merged commit bf0338f into pytest-dev:master May 20, 2020
@cdunklau cdunklau deleted the async-yield-fixture-in-fixture branch May 25, 2020 08:46
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

Successfully merging this pull request may close these issues.

2 participants