예제 #1
0
class TestSignalDetailsGUI(QtTestCase):
    def setUp(self):
        self.signal = Signal(get_path_for_data_file("esaver.complex"), "test")
        self.signal.sample_rate = 2e6
        self.dialog = SignalDetailsController(self.signal)

        if self.SHOW:
            self.dialog.show()

    def test_set_sample_rate(self):
        self.assertEqual(Formatter.science_time(self.signal.num_samples / self.signal.sample_rate),
                         self.dialog.ui.lDuration.text())

        self.dialog.ui.dsb_sample_rate.setValue(5e6)
        self.assertEqual(self.signal.sample_rate, 5e6)
        self.assertEqual(Formatter.science_time(self.signal.num_samples / self.signal.sample_rate),
                         self.dialog.ui.lDuration.text())
예제 #2
0
class TestSignalDetailsGUI(QtTestCase):
    def setUp(self):
        self.signal = Signal(get_path_for_data_file("esaver.complex"), "test")
        self.signal.sample_rate = 2e6
        self.dialog = SignalDetailsController(self.signal)

        if self.SHOW:
            self.dialog.show()

    def test_set_sample_rate(self):
        self.assertEqual(
            Formatter.science_time(self.signal.num_samples /
                                   self.signal.sample_rate),
            self.dialog.ui.lDuration.text())

        self.dialog.ui.dsb_sample_rate.setValue(5e6)
        self.assertEqual(self.signal.sample_rate, 5e6)
        self.assertEqual(
            Formatter.science_time(self.signal.num_samples /
                                   self.signal.sample_rate),
            self.dialog.ui.lDuration.text())
예제 #3
0
 def on_info_btn_clicked(self):
     sdc = SignalDetailsController(self.signal, self)
     sdc.show()
예제 #4
0
 def on_info_btn_clicked(self):
     sdc = SignalDetailsController(self.signal, self)
     sdc.show()