-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run tests ? #40
Comments
I guess unittest's autodiscover is loading examples/clientserver/client.py looking for tests and in that process the code gets executed (as the module lacks an As they are now, pydbus tests are not meant to be discovered (although that may change in future releases). pydbus' tests need to be run in a context where a session DBUS daemon is running. If you run the tests inside your desktop session, it will probably already be one, but that won't be the case if, for example, your package is tested in a build server, a chroot environment or a minimal docker container. tests/run.sh launches such daemon and runs the tests (also have a look at some improvements I proposed in #38). I guess your best bet would be using that script or some variation of it in the test phase of your package build. I'm in the process of packaging pydbus for Debian, and have used such a script to run the tests. |
./tests/run.sh I've merged #38 and released 0.6.0, so it should work well now. Thanks for packaging pydbus! |
I'm currently packaging pydbus for Fedora and the Fedora packaging guidelines recommend running tests during the package build if possible. So I've tried to run the pydbus tests with:
python3 setup.py test
But that results in a traceback:
Am I possibly running the pydbus tests incorrectly or is some additional setup required before the tests can be started (I see some docker files in the tests directory) ?
The text was updated successfully, but these errors were encountered: