Skip to content

Pytest fixture templates

Some templates/example of pytest fixtures

dummy_hello_str()

dummy_fixtures.py
1
2
3
4
5
6
7
from pytest import fixture


@fixture
def dummy_hello_str() -> str:
    """A dummy str fixture for pytests."""
    return "hello, world"