Ram*_*hum 7 python nose python-3.x
我以前在我的setup.cfg文件中有这个:
[nosetests]
where=test_python_toolbox
Run Code Online (Sandbox Code Playgroud)
但现在我通过提供两个并行代码库来支持Python 2和Python 3,一个在source_py2文件夹中,一个在source_py3文件夹中.setup.py知道如何检查Python版本并选择正确的版本.问题是,我不知道如何制作nosetests,在repo root中调用时,选择正确的文件夹.
我可以这样:
[nosetests]
where=source_py2/test_python_toolbox
Run Code Online (Sandbox Code Playgroud)
但是测试只适用于Python 2.我希望它们适用于两个版本.
我可以nosetests用旗帜发射,但我不愿意.
[nosetests]
where=source_py2/test_python_toolbox
py3where=source_py3/test_python_toolbox
Run Code Online (Sandbox Code Playgroud)