I'm developing a GUI with PySide and I create pixmap from images like this:
PHONE_IMAGE_PATH = "resources/images/phone.png"
self.phone_null = QtGui.QPixmap(GREY_DOT_PATH)
self.phone_null = self.phone_null.scaledToWidth(20)
This works perfectly when I run the program but when I test it with py.test this happens:
QPixmap::scaleWidth: Pixmap is a null pixmap
It says that the pixmap is null, so it seems like the image wasn't loaded properly.
I really want to test my code and I can't find any information about this problem anywhere. Does anyone have a solution to my problem?