Skip to content

Commit

Permalink
debug linux, add extra processEvents...
Browse files Browse the repository at this point in the history
  • Loading branch information
FillBk committed Apr 16, 2024
1 parent cc9e803 commit 249fcea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion test/asammdf/gui/widgets/test_MainWindow_Shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ def openFile(self, measurement_files):
-------
"""
self.processEvents(5)
for _ in range(100):
self.processEvents(0.01)
self.processEvents(1)
self.processEvents(0.1)

with mock.patch("asammdf.gui.widgets.main.QtWidgets.QFileDialog.getOpenFileNames") as mo_getOpenFileNames:
if measurement_files:
if isinstance(measurement_files, list):
Expand Down
4 changes: 3 additions & 1 deletion test/asammdf/gui/widgets/test_PlotWidget_ContextMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,10 @@ def test_Menu_EnableDisable_Action_DisableAll(self):
# Add Channels to Group
group_channel = self.plot.channel_selection.findItems("A", QtCore.Qt.MatchFlags())[0]
self.move_channel_to_group(src=self.plot_channel_a, dst=group_channel)
self.processEvents(5)
for _ in range(100):
self.processEvents(0.1)
self.processEvents(1)
self.processEvents(0.1)

msg = f"pixmap -- {Pixmap.color_map(self.plot.grab())} -- pixmap"
# Ensure that all items are enabled
Expand Down
4 changes: 3 additions & 1 deletion test/asammdf/gui/widgets/test_PlotWidget_Shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,12 @@ def test_Plot_Plot_Shortcut_Key_Ctrl_R(self):
mo_RangeEditor.assert_called()
self.assertEqual(self.channels[0].ranges, range_editor_result)

self.processEvents(1)
self.processEvents(5)
self.mouseClick_WidgetItem(self.channels[0])
for _ in range(100):
self.processEvents(0.01)
self.processEvents(1)

pm = self.plot.selected_channel_value.grab()
msg = f"pixmap -- {Pixmap.color_map(pm)} -- pixmap"
# Evaluate that plot has only Green and Red colors
Expand Down

0 comments on commit 249fcea

Please sign in to comment.