Skip to content

conftest

File used to discover python modules and run doctest.

See https://sybil.readthedocs.io/en/latest/use.html#pytest

my_path(tmpdir_factory) #

Fixture used in doctest to create a temporary directory.

Parameters:

Name Type Description Default
tmpdir_factory TempPathFactory

Temporary path factory from pytest.

required

Returns:

Type Description
Path

Temporary directory path.

Source code in src/careamics/conftest.py
@pytest.fixture(scope="module")
def my_path(tmpdir_factory: TempPathFactory) -> Path:
    """Fixture used in doctest to create a temporary directory.

    Parameters
    ----------
    tmpdir_factory : TempPathFactory
        Temporary path factory from pytest.

    Returns
    -------
    Path
        Temporary directory path.
    """
    return tmpdir_factory.mktemp("my_path")