From e9bb586e3d2847cca24ff61abd1e028380641962 Mon Sep 17 00:00:00 2001 From: "Dr. Johannes Pohl" Date: Tue, 24 Nov 2020 18:34:47 +0100 Subject: [PATCH] update requirements (#821) --- data/azure-pipelines.yml | 4 +--- data/requirements.txt | 2 +- src/urh/simulator/Simulator.py | 3 +-- tests/test_simulator.py | 3 --- tests/test_simulator_tab_gui.py | 13 +------------ 5 files changed, 4 insertions(+), 21 deletions(-) diff --git a/data/azure-pipelines.yml b/data/azure-pipelines.yml index 1fd242ab13..c9a5c90d44 100644 --- a/data/azure-pipelines.yml +++ b/data/azure-pipelines.yml @@ -174,9 +174,7 @@ jobs: condition: or(contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['python.arch'], 'x64')) displayName: "Create setup.exe" - - script: | - cd pyinstaller\urh - urh_debug.exe autoclose + - powershell: .\pyinstaller\urh\urh_debug.exe autoclose condition: or(contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['python.arch'], 'x64')) displayName: "Test urh_debug.exe" diff --git a/data/requirements.txt b/data/requirements.txt index 8a163d4c7e..e6af2e8562 100644 --- a/data/requirements.txt +++ b/data/requirements.txt @@ -1,5 +1,5 @@ numpy>=1.9; sys_platform != 'win32' -numpy>=1.9,!=1.16.0; sys_platform == 'win32' +numpy>=1.9,!=1.16.0,!=1.19.4; sys_platform == 'win32' pyqt5; sys_platform != 'win32' pyqt5!=5.14.2; sys_platform == 'win32' psutil diff --git a/src/urh/simulator/Simulator.py b/src/urh/simulator/Simulator.py index 4083201a9d..861eedac62 100644 --- a/src/urh/simulator/Simulator.py +++ b/src/urh/simulator/Simulator.py @@ -463,8 +463,7 @@ def receive_message(self, sniffer): if len(sniffer.messages) > 0: return sniffer.messages.pop(0) - spy = QSignalSpy(sniffer.message_sniffed) - if spy.wait(self.project_manager.simulator_timeout_ms): + if QSignalSpy(sniffer.message_sniffed).wait(self.project_manager.simulator_timeout_ms): try: return sniffer.messages.pop(0) except IndexError: diff --git a/tests/test_simulator.py b/tests/test_simulator.py index 48234ea4eb..3669824e85 100644 --- a/tests/test_simulator.py +++ b/tests/test_simulator.py @@ -66,7 +66,6 @@ def test_simulation_flow(self): self.alice.client_port = port dialog = self.form.simulator_tab_controller.get_simulator_dialog() # type: SimulatorDialog - dialog.project_manager.simulator_timeout_ms = 999999999 name = NetworkSDRInterfacePlugin.NETWORK_SDR_NAME dialog.device_settings_rx_widget.ui.cbDevice.setCurrentText(name) @@ -169,8 +168,6 @@ def test_external_program_simulator(self): stc.ui.btnAddParticipant.click() stc.ui.btnAddParticipant.click() - stc.project_manager.simulator_timeout_ms = 999999999 - stc.simulator_scene.add_counter_action(None, 0) action = next(item for item in stc.simulator_scene.items() if isinstance(item, CounterActionItem)) action.model_item.start = 3 diff --git a/tests/test_simulator_tab_gui.py b/tests/test_simulator_tab_gui.py index 29ce7b5b4b..11c02b2656 100644 --- a/tests/test_simulator_tab_gui.py +++ b/tests/test_simulator_tab_gui.py @@ -327,7 +327,7 @@ def test_valid_goto_targets(self): self.assertEqual(stc.ui.goto_combobox.count(), 5 + 1) # select item... also in combobox - def test_open_simulator_dialog_and_send_mismatching_message(self): + def test_open_simulator_dialog_and_send_message(self): def __wait_for_simulator_log_message(dialog, log_message): n = 0 @@ -345,7 +345,6 @@ def __wait_for_simulator_log_message(dialog, log_message): self.add_all_signals_to_simulator() stc.simulator_scene.select_all_items() - stc.simulator_config.project_manager.simulator_timeout_ms = 999999999 for msg in stc.simulator_scene.get_selected_messages(): msg.destination = self.dennis @@ -379,20 +378,10 @@ def __wait_for_simulator_log_message(dialog, log_message): sender.send_raw_data(IQArray(None, np.float32, 2000), 1) time.sleep(0.5) - __wait_for_simulator_log_message(dialog, "Waiting for message 2") - - sender.send_raw_data(modulator.modulate("10" * 176), 1) - time.sleep(0.5) - sender.send_raw_data(IQArray(None, np.float32, 2000), 1) - time.sleep(0.5) - - __wait_for_simulator_log_message(dialog, "Mismatch for label:") - dialog.on_timer_timeout() # enforce writing to text view simulator_log = dialog.ui.textEditSimulation.toPlainText() self.assertIn("Received message 1", simulator_log) self.assertIn("preamble: 11111111", simulator_log) - self.assertIn("Mismatch for label: preamble", simulator_log) dialog.close()