Skip to content

Commit

Permalink
Merge pull request #557 from vasole/test
Browse files Browse the repository at this point in the history
Test PyMcaMain instance.
  • Loading branch information
vasole authored Aug 20, 2019
2 parents a704bb2 + cd68308 commit bc9a5df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: xenial
dist: bionic

language: python

Expand Down
17 changes: 17 additions & 0 deletions PyMca5/tests/WidgetsInstantiationTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ def testShow(self):
from PyMca5.PyMcaGui.plotting import PyMcaPrintPreview
PyMcaPrintPreview.resetSingletonPrintPreview()

"""
class TestPyMcaMain(TestCaseQt):
def setUp(self):
super(TestPyMcaMain, self).setUp()
def testShow(self):
from PyMca5.PyMcaGui.pymca import PyMcaMain
widget = PyMcaMain.PyMcaMain()
widget.show()
self.qapp.processEvents()
from PyMca5.PyMcaGui.plotting import PyMcaPrintPreview
PyMcaPrintPreview.resetSingletonPrintPreview()
"""

def getSuite(auto=True):
test_suite = unittest.TestSuite()

Expand Down Expand Up @@ -154,6 +168,7 @@ def runTest(self):
TestScanWindow,
TestMcaWindow,
TestMcaAdvancedFit,
#TestPyMcaMain,
):
test_suite.addTest(
unittest.defaultTestLoader.loadTestsFromTestCase(TestCaseCls))
Expand All @@ -167,5 +182,7 @@ def test(auto=False):
auto = False
else:
auto = True
app = qt.QApplication([])
result = test(auto)
app = None
sys.exit(not result.wasSuccessful())

0 comments on commit bc9a5df

Please sign in to comment.