summaryrefslogtreecommitdiff
path: root/tests/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove all Python 2 Python codeChristoph Reiter2020-04-151-7/+2
|
* tests: don't assume anything about sys.excepthookChristoph Reiter2018-08-171-4/+2
| | | | | | | | On Ubuntu (at least the 18.10 dev version) sys.excepthook is some apport_excepthook object and not the default Python one. Our pytest extension was checking that sys.excepthook is the default which made every test fail as a result. Be less strict and don't assume anything about sys.excepthook instead.
* tests: run our pytest excepthook plugin first to prevent warningsChristoph Reiter2018-08-151-1/+1
| | | | | Our plugin raising exceptions seems to confuse other hooks, marking it to be run first gets rid of them.
* conftest: add absolute_import and update mesonHavard Graff2018-04-301-0/+2
| | | | See !66
* Move all py2/3 compat code into gi._compatChristoph Reiter2018-04-071-1/+1
|
* tests: add a pytest hook for handling unhandled exception in closuresChristoph Reiter2018-02-161-0/+31
In PyGObject when an exception is raised in a closure called from C then the error gets passed to sys.excepthook (on the main thread at least) and the error is by default printed to stdout. Since pytest by default hides stdout, errors can be easily missed now. To make these errors more visible add a test wrapper which checks sys.excepthook for unhandled exceptions and reraises them. This makes the tests fail and as a bonus also shows the right stack trace instead of just the error message.