Skip to content

An alternative plugin for pytest to make it support async tests and fixtures

License

Notifications You must be signed in to change notification settings

delfick/alt-pytest-asyncio

Repository files navigation

Alternative Pytest Asyncio

This plugin allows you to have async pytest fixtures and tests.

This plugin only supports python 3.11 and above.

The code here is influenced by pytest-asyncio but with some differences:

  • Error tracebacks from are from your tests, rather than asyncio internals
  • There is only one loop for all of the tests
  • You can manage the lifecycle of the loop yourself outside of pytest by using this plugin with your own loop
  • No need to explicitly mark your tests as async. (pytest-asyncio requires you mark your async tests because it also supports other event loops like curio and trio)

Like pytest-asyncio it supports async tests, coroutine fixtures and async generator fixtures.

Full documentation can be found at https://alt-pytest-asyncio.readthedocs.io

About

An alternative plugin for pytest to make it support async tests and fixtures

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •