mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 21:43:01 +00:00
Retain an assertion and update comments
This commit is contained in:
@@ -55,10 +55,16 @@ _db = None
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(items):
|
||||
"""add asyncio marker to all async tests"""
|
||||
"""This function is automatically run by pytest passing all collected test
|
||||
functions.
|
||||
|
||||
We use it to add asyncio marker to all async tests and assert we don't use
|
||||
test functions that are async generators which wouldn't make sense.
|
||||
"""
|
||||
for item in items:
|
||||
if inspect.iscoroutinefunction(item.obj):
|
||||
item.add_marker('asyncio')
|
||||
assert not inspect.isasyncgenfunction(item.obj)
|
||||
|
||||
|
||||
@fixture(scope='module')
|
||||
|
Reference in New Issue
Block a user