-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
TOX_DISCOVER not working (micromamba) #3272
Comments
Thanks for your report. The related PR would be #2245 But as you have reported that this feature has worked for you in the past, we probably need to look somewhere else. When I have a look at the implementation, then I can see that it uses the FWIW, where did you read about I think the next steps would be to use a debugger and step though, and inspect at which step things go south. Interpreter discovery is not handled by tox itself, but by virtualenv. |
So it seems that there is an issue with how the env var is parsed in https://github.com/tox-dev/tox/blob/main/src/tox/config/cli/env_var.py#L28-L32. The I'll try to set something up for a bisect, maybe that can help figure out what's going on. FYI: I've found the |
The documentation has been rewritten with version 4. Now we universally support all environment variables by translating CLI flags from environment variables. This sounds like a bug to me. |
I believe the issue was introduced with 4.0.0. It successfully runs with 3.28, but with 4.0.0 the buggy behavior comes in. Here is a minimal script to reproduce the issue: from tox.config.cli.env_var import get_env_var
import os
def main():
os.environ["TOX_DISCOVER"] = "/foo/bar/baz /baz/bar/foo /bar/foo/baz"
paths = get_env_var("discover", list)[0]
print(paths)
expected = ["/foo/bar/baz", "/baz/bar/foo", "/bar/foo/baz"]
print(expected)
if paths != expected:
return 1
return 0
if __name__ == "__main__":
exit(main()) Output: ['/', 'f', 'o', 'o', '/', 'b', 'a', 'r', '/', 'b', 'a', 'z', ' ', '/', 'b', 'a', 'z', '/', 'b', 'a', 'r', '/', 'f', 'o', 'o', ' ', '/', 'b', 'a', 'r', '/', 'f', 'o', 'o', '/', 'b', 'a', 'z']
['/foo/bar/baz', '/baz/bar/foo', '/bar/foo/baz'] I'd open be to contributing a fix if new contributors are desired 🙂 |
Please do so 😊 |
Issue
I've set
TOX_DISCOVER
to a space separated list of paths, however,tox
seems to ignore that.Even when I pass it directly to
--discover
, only the last path is actually discovered.Console output from my investigation
Output of running tox
Output of
tox -rvv
Minimal example
You can check the repo https://github.com/mimre25/ansible-lint-empty-lines-between-tasks, it's rather small.
I've tried the same with the paths being
:
separated, but to no avail.Unfortunately, I couldn't find the format required for
--discover
/TOX_DISCOVER
in the documentation, but the space separated format used to work in the past when I was using miniconda.The text was updated successfully, but these errors were encountered: