Skip to content

Commit

Permalink
update requirements (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
jopohl committed Nov 24, 2020
1 parent 3a92538 commit e9bb586
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 21 deletions.
4 changes: 1 addition & 3 deletions data/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion data/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/urh/simulator/Simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions tests/test_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
13 changes: 1 addition & 12 deletions tests/test_simulator_tab_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit e9bb586

Please sign in to comment.