Have not tried this with pytests, let alone have a working test setup for sgtk apps. But I think to get “from sgtk.platform.qt import QtCore, QtGui” to work you probably have to bootstrap an engine since this Qt module serves as a consistent layer between the various pyqt and pyside flavours of all the DCC’s.
Patrick is probably right, you might have PySide installed, but it is missing in your path.
We use tox for tests and it installs dependencies in a separate environment when running tests (read from setup.py).
Haven’t tried this in sg apps, though.
Thanks guys, I’ll give it another go. I do have PySide installed, but perhaps it’s not pathed up correctly. I’m running my tests from within a venv with specific packages installed.
Thanks again.
p.