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

Add async fixture support (#41) #45

Conversation

sashgorokhov
Copy link
Contributor

@sashgorokhov sashgorokhov commented Mar 11, 2017

  • Added async generator fixture support
  • Added async fixture support

There are some problems I didnt solved yet:

  • @asyncio.coroutine fixtures. From inside the code, such fixtures appears as common generators - didnt realized how to distinguish them from, for example, user-defined fixtures that supposed to return generators.
  • Async fixtures scope. Currently only function scope is supported. I'll try to solve it. The main problem that async fixtures must (or not?) be run in the same event loop as test function. With module and session scoped fixtures this could be a problem.

Closes #41

* Added async generator fixture support
* Added async fixture support
@Tinche
Copy link
Member

Tinche commented Mar 13, 2017

Honestly this looks like great work! Could you please add a little documentation to the readme?

@sashgorokhov
Copy link
Contributor Author

@Tinche yes I'll add documentation for these async fixtures this week. What about async fixtures function-only scope? Is that ok?

Added docs for async fixtures
@Tinche
Copy link
Member

Tinche commented Mar 16, 2017

Regarding function-scope only fixtures, I'll take what I can get. :)

@Tinche
Copy link
Member

Tinche commented Mar 24, 2017

Thank you for your contribution!

@Tinche Tinche merged commit a3e9d83 into pytest-dev:feature/async_fixtures Mar 24, 2017
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.

None yet

2 participants