Skip to content

Commit

Permalink
debug ..12, it must be ok!
Browse files Browse the repository at this point in the history
  • Loading branch information
FillBk committed Apr 8, 2024
1 parent b7443c1 commit 4aa2659
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/asammdf/gui/widgets/test_FileWidget_Shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,18 @@ def test_FileWidget_Shortcut_Key_Period(self):
Evaluate:
- Evaluate number of background colors must be greater when signal is without dots
"""
# Setup
self.create_window("Plot")
self.add_channels([35])
plot = self.widget.mdi_area.subWindowList()[0].widget()
# Remove bookmarks if plot is with bookmarks
if not plot.bookmark_btn.isFlat():
QTest.mouseClick(plot.bookmark_btn, Qt.MouseButton.LeftButton)
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)
self.processEvents(0.1)

# Find first dot
Expand All @@ -395,7 +400,7 @@ 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(plot.plot.grab())
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 @@ -405,7 +410,7 @@ 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(plot.plot.grab())
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)
Expand Down

0 comments on commit 4aa2659

Please sign in to comment.