Whenever I try to create a
QApplication code locally works as expected but segfaults in travis.
I pinpointed the issue to the following line:
qapp = QtWidgets.QApplication()
This is the error I’m getting (taken from the travis log):
You’ll need to run
xvfb on Travis to be able to execute graphical applications (if you don’t need any GUI, use
You can either follow the Travis docs, or (since it looks like you’re using
pytest), use my pytest-xvfb plugin.
One thing to note,
-s flag (to not hide output from “passing” tests) is quite useful when debugging issues like this.