nox
nox copied to clipboard
Add concept of "optional" parameter
For example, if I wanted to (as a nox
user) impl. my own support for arch (as in #60), then I'd want to do something like:
$ nox -s "unit(py='2.7', arch='32')"
but I wouldn't want
$ nox -s "unit(py='2.7')"
to run over all choices of arch
, I would just want arch
to be ignored (arch
would only be relevant on OS X).
Since nox
has a lot of pytest
-like interfaces, I threw together an example of how pytest
deals with optional test cases with pytest.mark.parametrize
. (Isn't a perfect mapping.)
NOTE: @jonparrott and I discussed this earlier this week, I just never filed an issue
@theacodes Optional parameters are useful independent of specifying architecture as in #60 (and discussed in #63).
ISTM that implementing a way to specify or pass-through the architecture would be much easier if we had optional parameters in nox
.
So tackling this would both add a nice feature and enable a simpler impl. of the architecture feature as well. WYDT?
@dhermes do you still think this is relevant?
Yes I do still think it's relevant, since there are certain parameter combinations that only make since in restricted environments (e.g. in a container, on Windows, etc.)
The blocker on this issue is figuring out exactly how this would work and how we would invoke it using -s
and -k
.