fix: fixed so that running tests now works

This commit is contained in:
stalbe_j
2023-01-17 10:26:26 +01:00
parent 15f91003db
commit e3635bb417

View File

@ -28,15 +28,17 @@ class TestViewUnit(unittest.TestCase):
print('setup')
self.app = QApplication(sys.argv)
theme.apply(self.app)
ctrl_c.setup(self.app)
# ctrl_c.setup(self.app)
self.mw = MainWindow()
self.mw.show()
def tearDown(self) -> None:
print("teardown")
self.mw.rst.wait_for_stop()
# self.mw.rst.shutdown()
self.app.quit()
print('app quit called')
del self.mw
del self.app
def test_defaults(self):
@ -100,8 +102,8 @@ class TestViewUnit(unittest.TestCase):
mw.append_data("sine", point)
item.value.append.assert_called_once_with(point)
assert item.set_alarm.called_once_with(True)
item.set_alarm.assert_called_once_with(True)
def test_on_make_new_plot(self):
mw = self.mw