Join GitHub today
posargs fails when providing arguments with spaces in quotes #310
An example tox.ini
And the usage
In both cases
No amount of escaping (either of the space or the quotes) works. What does work, however, is:
In other words, using both types of quotes works.
I looked but didn't see this reported anywhere else and I'm frankly not certain this is something that can be fixed.
Original comment by @sigmavirus24
@blueyed yeah the typical workflow dilemma. Anyway, I described that hack around it above and have been just avoiding it by not using tox + posargs when necessary. I think that points to it needing to be fixed because I don't care to have to do the extra work to make tox do the right thing.
I'm leaving the issue open anyway. At the very least tox should document this as a known quantity so others don't have to spend 30 minutes experimenting/debugging to find the right way to make this work.
Original comment by @blueyed
You can use
It will still say the following (without quotes) though, but work:
(According to @The-Compiler it might not get fixed, because people might be used to this workaround already?!)
Original comment by glouie
I have similar problems as well and would like to know how to pass arguments with spaces or even able to pass in single or double quotes
I"m trying to run tox and pass arguments down to py.test.
instead of running
referenced this issue
Sep 17, 2016
As I'm transitioning my projects from pytest-runner to tox, I encountered this issue today:
I verified that the proposed workaround does work.
ugh. That's not right. I'd really like to see a proper fix for this issue... and if absolutely necessary, include an option to retain the broken behavior for those who really must rely on it.
I've created a fix for this issue, please review #385
I am not sure how much of a backward-incompatibility this really is. We could do a tox-2.5 to indicate to people that they should pay a bit more attention instead of just a "micro" 2.4.2 release. What do you think?
My current view is that this only changes how you invoke tox on the command line and relatively few people will have gotten to the work around (double-quoting) and rely on it from automated scripts. Agree, disagree?
I agree that relatively few will have gotten around to using the workaround in a formal way. I've adopted that technique in just two of our Jenkins scripts, which non-interactively invoke
I did figure out that I could indeed rely on tox.ini for passing the