pyqtgraph/pyqtgraph/tests/test_qt.py
Luke Campagnola 5a8d77d6f2 Fixed unicode issues with PySide loadUiType
Added unit test for loadUiType
2014-04-26 13:45:34 -04:00

24 lines
468 B
Python

import pyqtgraph as pg
import gc, os
app = pg.mkQApp()
def test_isQObjectAlive():
o1 = pg.QtCore.QObject()
o2 = pg.QtCore.QObject()
o2.setParent(o1)
del o1
gc.collect()
assert not pg.Qt.isQObjectAlive(o2)
def test_loadUiType():
path = os.path.dirname(__file__)
formClass, baseClass = pg.Qt.loadUiType(os.path.join(path, 'uictest.ui'))
w = baseClass()
ui = formClass()
ui.setupUi(w)
w.show()
app.processEvents()