Skip to content

Add async fixture support (#41)#45

Merged
Tinche merged 3 commits into
pytest-dev:feature/async_fixturesfrom
sashgorokhov-forks:feature/async_fixtures
Mar 24, 2017
Merged

Add async fixture support (#41)#45
Tinche merged 3 commits into
pytest-dev:feature/async_fixturesfrom
sashgorokhov-forks:feature/async_fixtures

Conversation

@sashgorokhov

@sashgorokhov sashgorokhov commented Mar 11, 2017

Copy link
Copy Markdown
Contributor
  • 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

Tinche commented Mar 13, 2017

Copy link
Copy Markdown
Member

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

@sashgorokhov

Copy link
Copy Markdown
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

Tinche commented Mar 16, 2017

Copy link
Copy Markdown
Member

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

@Tinche

Tinche commented Mar 24, 2017

Copy link
Copy Markdown
Member

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.

2 participants