Add only_not_asyncio.

This commit is contained in:
Andrey Rakhmatullin 2021-02-02 15:20:04 +05:00
parent 7e9f498e00
commit d658552f23
2 changed files with 7 additions and 0 deletions

View File

@ -55,5 +55,11 @@ def only_asyncio(request, reactor_pytest):
pytest.skip('This test is only run with --reactor=asyncio')
@pytest.fixture(autouse=True)
def only_not_asyncio(request, reactor_pytest):
if request.node.get_closest_marker('only_not_asyncio') and reactor_pytest == 'asyncio':
pytest.skip('This test is only run without --reactor=asyncio')
# Generate localhost certificate files, needed by some tests
generate_keys()

View File

@ -21,6 +21,7 @@ addopts =
twisted = 1
markers =
only_asyncio: marks tests as only enabled when --reactor=asyncio is passed
only_not_asyncio: marks tests as only enabled when --reactor=asyncio is not passed
flake8-max-line-length = 119
flake8-ignore =
W503