Created
August 10, 2018 15:19
-
-
Save un-def/5fa2f357920abd6c71b61b94c5289791 to your computer and use it in GitHub Desktop.
[pytest-asyncio] mark all coroutinefunction tests with 'asyncio' marker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pytest_collection_modifyitems(items): | |
for item in items: | |
if inspect.iscoroutinefunction(item.function): | |
item.add_marker('asyncio') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment