Debian Codegraph @

docs/how-to-guides/parametrize_with_asyncio.rst

raw
1 =====================================
2 How to parametrize asynchronous tests
3 =====================================
4
5 The ``pytest.mark.parametrize`` marker works with asynchronous tests the same as with synchronous tests. You can apply both ``pytest.mark.asyncio`` and ``pytest.mark.parametrize`` to asynchronous test functions:
6
7 .. include:: parametrize_with_asyncio_example.py
8 :code: python
9
10 .. note::
11 Whilst asynchronous tests can be parametrized, each individual test case still runs sequentially, not concurrently. For more information about how pytest-asyncio executes tests, see :ref:`concepts/concurrent_execution`.