def test_zoom(self):
self.add_signal_to_form("esaver.complex")
frame = self.form.signal_tab_controller.signal_frames[0]
QApplication.instance().processEvents()
x_zoom = frame.ui.spinBoxXZoom.value()
self.assertIn(x_zoom, range(100, 111))
for _ in range(10):
frame.ui.gvSignal.zoom(1.1)
self.assertGreater(frame.ui.spinBoxXZoom.value(), x_zoom)
x_zoom = frame.ui.spinBoxXZoom.value()
for _ in range(10):
frame.ui.gvSignal.zoom(0.99)
self.assertLess(frame.ui.spinBoxXZoom.value(), x_zoom)
x_zoom = frame.ui.spinBoxXZoom.value()
samples_in_view = frame.ui.lSamplesInView.text()
frame.ui.spinBoxXZoom.setValue(frame.ui.spinBoxXZoom.value() + 400)
self.assertNotEqual(samples_in_view, frame.ui.lSamplesInView.text())
评论列表
文章目录