Skip to content

environment PYTEST_CACHE_DIR_BASE for better share location #14613

@loynoir

Description

@loynoir

What's the problem this feature will solve?

Current

$ cd /path/to/project/1
$ export PYTEST_ADDOPTS="-o cache_dir=/build/pytest_cache_dir_base/${PWD:?}"
$ uv run pytest

$ cd /path/to/project/2
$ export PYTEST_ADDOPTS="-o cache_dir=/build/pytest_cache_dir_base/${PWD:?}"
$ uv run pytest

$ cd /path/to/project/3
$ export PYTEST_ADDOPTS="-o cache_dir=/build/pytest_cache_dir_base/${PWD:?}"
$ uv run pytest

Describe the solution you'd like

environment PYTEST_CACHE_DIR_BASE for better share location

$ export PYTEST_CACHE_DIR_BASE="/build/pytest_cache_dir_base"

$ cd /path/to/project/1
$ uv run pytest

$ cd /path/to/project/2
$ uv run pytest

$ cd /path/to/project/3
$ uv run pytest

Alternative Solutions

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: cacherelated to the cache builtin pluginstatus: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions