Reputation: 43031
I am trying to use nosetests
as part of my building/publishing chain, which is based on distutils2
(using the setup.cfg
file instead of the "legacy" setup.py
script).
Unluckily, when I issue:
pysetup run test
I get:
running test
running build
running build_py
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
...yet, if I issue nosetests
from the same location I can see all my tests being executed. My directory structure looks like:
|-- docs
|-- my_package
| |-- __init__.py
| |-- foobar.py
| `-- tests
| `-- foobar_test.py
|-- README.md
|-- requirements.txt
`-- setup.cfg
and the relevant part of my setup.cfg
file contains:
[test]
runner = nosetests
What am I doing wrong? The official documentation is less than perfect on this point...
Upvotes: 2
Views: 172
Reputation: 303
Have you tried with:
pysetup run test --runner=nosetests
I have the same problem and it seems to me that distutils2 doesn't care too much of what I type in [test] section (I can write anything, it never raises an error).
Anyway it won't run either, becouse both --runner and --suite options expect a module.
The only way I was able to run tests was with a "run_tests.py like" module that I put inside a package and than I call with:
pysetup run test --suite=package_were_tests_runner_is.run_tests
Upvotes: 1