Skip to content

Commit

Permalink
Improve tests (jopohl#760)
Browse files Browse the repository at this point in the history
* increase timeout for ci

* fix deprecation warnings by using raw strings
  • Loading branch information
jopohl authored Apr 17, 2020
1 parent 47616e7 commit 69ef596
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/urh/plugins/InsertSine/InsertSinePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def dialog_ui(self) -> QDialog:
self.__dialog_ui.doubleSpinBoxSampleRate.setValue(self.__sample_rate)
self.__dialog_ui.doubleSpinBoxNSamples.setValue(self.__num_samples)
self.__dialog_ui.lineEditTime.setValidator(
QRegExpValidator(QRegExp("[0-9]+([nmµ]*|([\.,][0-9]{1,3}[nmµ]*))?$")))
QRegExpValidator(QRegExp(r"[0-9]+([nmµ]?|([\.,][0-9]{1,3}[nmµ]?))?$"))
)

scene_manager = SceneManager(self.dialog_ui.graphicsViewSineWave)
self.__dialog_ui.graphicsViewSineWave.scene_manager = scene_manager
Expand Down
2 changes: 1 addition & 1 deletion src/urh/simulator/Simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def __wait_for_devices(self):

def __fill_counter_values(self, command: str):
result = []
regex = "(item[0-9]+\.counter_value)"
regex = r"(item[0-9]+\.counter_value)"
for token in re.split(regex, command):
if re.match(regex, token) is not None:
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_send_recv_dialog_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def test_sniff(self):

self.assertFalse(generator_frame.network_sdr_plugin.is_sending)

QTest.qWait(50)
QTest.qWait(250)
received_msgs = sniff_dialog.ui.txtEd_sniff_Preview.toPlainText().split("\n")
orig_msgs = generator_frame.table_model.protocol.plain_bits_str

Expand Down

0 comments on commit 69ef596

Please sign in to comment.