Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making the `nosetests` script select folder by Python version

I used to have this in my setup.cfg file:

[nosetests]
where=test_python_toolbox

But now I'm supporting Python 2 and Python 3 by supplying two parallel codebases, one in the source_py2 folder and one in the source_py3 folder. setup.py knows how to check the Python version and choose the correct one. Problem is, I don't know how to make nosetests, when invoked in the repo root, select the correct folder.

I could have this:

[nosetests]
where=source_py2/test_python_toolbox

But then tests would work only for Python 2. I want them to work for both versions.

I could launch nosetests with a flag, but I'd rather not.

like image 954
Ram Rachum Avatar asked Sep 14 '13 17:09

Ram Rachum


1 Answers

[nosetests]
where=source_py2/test_python_toolbox
py3where=source_py3/test_python_toolbox
like image 134
Ram Rachum Avatar answered Sep 21 '22 13:09

Ram Rachum