openlp/tests/functional/__init__.py

20 lines
498 B
Python
Raw Normal View History

2013-02-14 17:30:28 +00:00
import sip
2013-08-31 18:17:38 +00:00
sip.setapi('QDate', 2)
sip.setapi('QDateTime', 2)
sip.setapi('QString', 2)
sip.setapi('QTextStream', 2)
sip.setapi('QTime', 2)
sip.setapi('QUrl', 2)
sip.setapi('QVariant', 2)
2013-02-16 15:02:19 +00:00
import sys
2013-02-16 15:02:19 +00:00
from PyQt4 import QtGui
if sys.version_info[1] >= 3:
from unittest.mock import patch, MagicMock
else:
2013-09-20 09:35:50 +00:00
from mock import patch, MagicMock
2013-02-16 15:02:19 +00:00
# Only one QApplication can be created. Use QtGui.QApplication.instance() when you need to "create" a QApplication.
application = QtGui.QApplication([])