test_signal_tab_GUI.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:urh 作者: jopohl 项目源码 文件源码
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())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号