Skip to main content

Synthetic data to be used as pytest fixtures

Vicom provides a set of synthetic but realistic volumes that can be used in pytest fixtures for testing. It returns a list of volumes of each volume_type. The size of the volumes can be set, but is 6x5x4 by default for a fast runtime. Recommended usage in the conftest.py:

    from vicom.utils.pytest_fixtures import create_synthetic_volumes
import pytest

@pytest.fixture(scope="session")
def synthetic_volumes():
volumes = create_synthetic_volumes(volume_size=(6, 5, 4))
return volumes

::: vicom.utils.pytest_fixtures.create_synthetic_volumes options: show_root_heading: true