-
Notifications
You must be signed in to change notification settings - Fork 76
Description
I'm packaging for Arch Linux and want to run tests as part of the build. I've noticed that test suite is quite unusual, implemented as a tests/run.sh
which doesn't really work for me because it expects the library to already be installed prior to running tests. However I want first to run tests, and only if they succeed proceed with installation.
The usual way to run tests is support command python setup.py test
. What this does is creates an egg and runs tests inside, without having to install the package first.
Here are the exact commands I want to execute as part of packaging process:
# build the package:
python setup.py build
# run tests:
python setup.py test
# install the package:
python setup.py install --skip-build
I also noticed I'm not the only person who is surprised by the way of executing unit tests (#40).
Would you be interested in investigating and improving this? Here's a random example of a package that follows this guideline, maybe you can use it for reference:
https://github.com/regebro/tzlocal/blob/e3d97f1eb37928cc77b89a4a80fdb968277383a8/setup.py#L42