Skip to content

Commit

Permalink
Pass
Browse files Browse the repository at this point in the history
  • Loading branch information
FillBk committed Apr 8, 2024
1 parent 4aa2659 commit 40a4afb
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ def test_FileWidget_Shortcut_Key_Period(self):
if not plot.plot.with_dots:
plot.plot.set_dots(True)
# Remove grid if plot is with grid
if not plot.focused_mode_btn.isFlat():
QTest.mouseClick(plot.focused_mode_btn, Qt.MouseButton.LeftButton)
if not plot.hide_axes_btn.isFlat():
QTest.mouseClick(plot.hide_axes_btn, Qt.MouseButton.LeftButton)
self.processEvents(0.1)

# Find first dot
Expand All @@ -400,7 +400,6 @@ def test_FileWidget_Shortcut_Key_Period(self):
with_dots_black_coverage = 0
for cov in pm_with_dots.values():
with_dots_black_coverage += cov.count(Pixmap.COLOR_BACKGROUND)
debug_wd_pm = Pixmap.color_map(self.widget.grab())
# Event
QTest.keySequence(self.widget, QKeySequence(self.shortcuts["set_line_style"]))
self.processEvents(0.1)
Expand All @@ -410,14 +409,12 @@ def test_FileWidget_Shortcut_Key_Period(self):
without_dots_black_coverage = 0
for cov in pm_without_dots.values():
without_dots_black_coverage += cov.count(Pixmap.COLOR_BACKGROUND)
debug_wod_pm = Pixmap.color_map(self.widget.grab())
debug = f"pixmap : {debug_wd_pm} : pixmap || pixmap : {debug_wod_pm} : pixmap"
# Evaluate
self.assertGreater(without_dots_black_coverage, with_dots_black_coverage, debug)
self.assertGreater(without_dots_black_coverage, with_dots_black_coverage)

# Event
QTest.keySequence(self.widget, QKeySequence(self.shortcuts["set_line_style"]))
self.processEvents(1)
self.processEvents(0.1)
# Gat new pixmap
pm_with_dots = Pixmap.color_map(plot.plot.grab(rect))
# New black coverage
Expand Down

0 comments on commit 40a4afb

Please sign in to comment.