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

Allow tox to ignore missing python interpretors - pass when some are missing #59

Closed
pytoxbot opened this Issue Sep 17, 2016 · 9 comments

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

Tox should be able to run tests on all available (defined) interpretors but it should not fail if one or more of them are missing.

This is a feature request that would allow users to execute tox on various systems using the same tox.ini command.

It would be essential for tox to return a success return code when this option is used.

One of the main reasons for asking this, is usage of tox in automation, where you want to run tox on different platforms with the same configuration for all of them.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue59 -- add --skip-if-missing-interpreter. Thanks
Alexandre Conrad for the PR.

→ <<cset 8e2d6a24bd13>>

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @aconrad

The PR above was merge. @hpk42 can you mark this ticket as resolved? Thanks for your time!

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @aconrad

I'd like to see this happening, too. Our Jenkins instance supports 2.6, 2.7, pypy, 3.3, and 3.4. But my tests fail locally because I don't have all of these environments installed. A SKIPPED state would be nice.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @warsaw

I do think it makes sense to skip missing environments. Currently, when building tox-tested packages for Debian, I have to fiddle with the command line to get a proper -e argument (which isn't completely trivial given the mapping from pythonX.Y -> pyXY). On Debian, we'll only have at most a couple of relevant Python environments we want to run the tests on, e.g. python2.7 and python3.3 for now (but probably including python3.4 at some point).

@pytoxbot pytoxbot closed this Sep 17, 2016

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

I think introducing a "skipped" state for missing interpreters or failures to install dependencies is useful. I have setups where i run tox on multiple hosts and if one host cannot run a test environment, it's not a problem. So i think that "failures" should be ones where the test commands failed and nothing else. @lukaszb , if you want to implement this change, i'd be happy to review the PR. Please note that tox since the last release writes a result json file which should also reflect this new "skipped" state.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @lukaszb

@hpk42 any decision on this? Personally, I would probably reject this. Tools should promote best practices and proposed switch doesn't look like one of them. When configuring CI one should know about available Python versions and for user it is probably better to see what interpreters are missing on their system but are supported by package being tested. It's just either passing that extra switch or Python versions explicitly, as it was already said.

However, if you'd accept this enhancement, I could work on it (looks like a simple changes).

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by poros_7

Any news about this feature? The last comment is one year old and it would still be great to have this feature.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

There would be the caveat that if you acccidentally have an interpreter missing on some host, then the CI automation run would still report success. I guess you are aware that you can enumerate envs with "-e py25,py26,py27". This is bound to get some more wildcarding flexibility soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment