File: parametrize_with_asyncio_example.py

package info (click to toggle)
python-pytest-asyncio 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 648 kB
  • sloc: python: 2,933; makefile: 24; sh: 1
file content (10 lines) | stat: -rw-r--r-- 197 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import asyncio

import pytest


@pytest.mark.asyncio
@pytest.mark.parametrize("value", [1, 2, 3])
async def test_parametrized_async_function(value):
    await asyncio.sleep(1)
    assert value > 0