Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inheritable pytest configuration #13173

Open
uwu-420 opened this issue Jan 29, 2025 · 1 comment
Open

Inheritable pytest configuration #13173

uwu-420 opened this issue Jan 29, 2025 · 1 comment

Comments

@uwu-420
Copy link

uwu-420 commented Jan 29, 2025

Hi, thanks for making pytest!

I'm trying out a monorepo setup which has a pyproject.toml file at the root level and one per sub-project in the monorepo. Ideally, I'd like to set something like

# ./pyproject.toml
[tool.pytest.ini_options]
asyncio_mode = "auto"

only once in the root-level pyproject.toml file and the sub-projects automatically inherits that setting unless overridden in their respective pyproject.toml. Another possibility would be to do it like ruff (see https://docs.astral.sh/ruff/settings/#extend). So something like this in the sub-project's pyproject.toml

# ./sub_project/pyproject.toml
[tool.pytest.ini_options]
extend = "../pyproject.toml"
# Inherits asyncio_mode = "auto"
addopts = "-v"

Cheers!

@RonnyPfannschmidt
Copy link
Member

This currently is in the far future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants