-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
pyproject [tool.tox.env_run_base] not installing dependency group (PEP 735) #3420
Comments
It also fails with this in [tool.tox.env_run_base]
dependency_groups = [ # changed from dependency-groups
"test",
]
[dependency-groups]
test = [
"freezegun",
"pytest",
"pytest-cov",
"respx>=0.11",
]
|
I will need to look into it but that seems about if it doesn't work. |
You cannot mix TOML and the INI config. These are separate, and they have a well defined priority in between them https://tox.wiki/en/latest/config.html#discovery-and-file-types (hence why at the docs there is a tab to select your config format): ![]() When making that change: ❯ git diff HEAD -u
diff --git a/pyproject.toml b/pyproject.toml
index 6e7db70..e691bb3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -98,11 +98,6 @@ filterwarnings = [
]
testpaths = [ "tests" ]
-[tool.tox.env_run_base]
-dependency_groups = [
- "test",
-]
-
[dependency-groups]
test = [
"freezegun",
diff --git a/tox.ini b/tox.ini
index 81ec8d8..afbf0ed 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,6 +19,7 @@ commands =
--cov-report term \
--cov-report xml \
{posargs}
+dependency_groups = test
[testenv:cog]
skip_install = true things work: ❯ tox c -e py313 -k dependency_groups
[testenv:py313]
dependency_groups = test Not sure how we can document this better 🤔 |
Ah, thank you, this was my misunderstanding and that makes sense. I think the docs are now fine. Thanks for the help! |
Issue
Environment
Provide at least:
Output of running tox
Output of
tox -rvv
Minimal example
This works (hugovk/norwegianblue@b0f700e -> https://github.com/hugovk/norwegianblue/actions/runs/11447266934):
pyproject.toml
:tox.ini
:But moving
dependency_groups = test
fromtox.ini
and into pyproject.toml's[tool.tox.env_run_base]
doesn't (hugovk/norwegianblue@b24554c -> https://github.com/hugovk/norwegianblue/actions/runs/11447524100/job/31849049763):pyproject.toml
:tox.ini
:The text was updated successfully, but these errors were encountered: