e7a30b9324
Remove if __name__ == "__main__" bits, replace some == None to is None checks Cleanup variety of static code checker issue Removed missing imports, restructured some logic to make a little cleaner, fixed a function in test_dockarea, unfortunately broke the test so now I tell pytest to expect the Exception.
24 lines
588 B
Python
24 lines
588 B
Python
import initExample ## Add path to library (just for examples; you do not need this)
|
|
|
|
import pyqtgraph as pg
|
|
from pyqtgraph.Qt import QtTest
|
|
|
|
from examples.ExampleApp import ExampleLoader
|
|
"""
|
|
This file is used by test_examples.py for ensuring the Example App works.
|
|
It is not named test_ExampleApp.py as that way the Example application is
|
|
not run twice.
|
|
"""
|
|
|
|
pg.mkQApp()
|
|
|
|
def test_ExampleLoader():
|
|
loader = ExampleLoader()
|
|
QtTest.QTest.qWaitForWindowExposed(loader)
|
|
QtTest.QTest.qWait(200)
|
|
loader.close()
|
|
|
|
if __name__ == "__main__":
|
|
test_ExampleLoader()
|
|
pg.exec()
|