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 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()
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())
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())
def on_info_btn_clicked(self): sdc = SignalDetailsController(self.signal, self) sdc.show()
def on_info_btn_clicked(self): sdc = SignalDetailsController(self.signal, self) sdc.show()