3

I there a framework that can be used to run Python unit tests on all installed versions of python?

I have 3 versions of python installed on my system and I want to be able to run the unitests on all of them. The executables are using the "usual" naming convention: python2.5 python2.7 python3.2

My current environment is Windows but I think that the solution should be platform independent.

sorin
  • 161,544
  • 178
  • 535
  • 806
  • What part of your OS makes this hard? It seems like you're merely changing the executable that's used. What more needs to be changed for each version than the base executable? – S.Lott Oct 06 '11 at 17:07

1 Answers1

7

tox does this and even more, like running the tests on multiple platforms too.

sorin
  • 161,544
  • 178
  • 535
  • 806
Ned Batchelder
  • 364,293
  • 75
  • 561
  • 662
  • After a little "how do I get this to work??" fiddling, `tox` is doing good things for my multi-version testing. Install hint: Installing on every version of Python you want to test under (e.g. `sudo python2.5 -m easy_install tox` * python2.5, python2.6, python2.7, ...) seemed to be the trick. – Jonathan Eunice Oct 15 '12 at 15:19