diff --git a/test/asammdf/gui/test_base.py b/test/asammdf/gui/test_base.py index 60c02ae18..35bf15511 100644 --- a/test/asammdf/gui/test_base.py +++ b/test/asammdf/gui/test_base.py @@ -346,7 +346,7 @@ def search_signal_from_to(pixmap, color, ax): """ from_to = [] image = pixmap.toImage() - if ax == 'x' or ax == 'X': + if ax == "x" or ax == "X": for x in range(image.width()): for y in range(image.height()): if QtGui.QColor(image.pixel(x, y)).name() == color: @@ -365,7 +365,7 @@ def search_signal_from_to(pixmap, color, ax): break return from_to - elif ax == 'y' or ax == 'Y': + elif ax == "y" or ax == "Y": for y in range(image.height()): for x in range(image.width()): if QtGui.QColor(image.pixel(x, y)).name() == color: diff --git a/test/asammdf/gui/widgets/test_PlotWidget_Shortcuts.py b/test/asammdf/gui/widgets/test_PlotWidget_Shortcuts.py index f800b7044..982807511 100644 --- a/test/asammdf/gui/widgets/test_PlotWidget_Shortcuts.py +++ b/test/asammdf/gui/widgets/test_PlotWidget_Shortcuts.py @@ -8,7 +8,6 @@ class TestShortcutsWOChannels(TestPlotWidget): - def setUp(self): # Open measurement file self.setUpFileWidget(measurement_file=self.measurement_file, default=True) @@ -585,7 +584,6 @@ def test_Plot_Plot_Shortcut_Shift_Key_Alt_F(self): class TestShortcutsWith_1_Channel(TestPlotWidget): - def setUp(self): # Open measurement file self.setUpFileWidget(measurement_file=self.measurement_file, default=True) @@ -619,7 +617,7 @@ def setUp(self): def test_Plot_Plot_Shortcut_Key_W(self): """ - Check if signal is fitted properly after pressing key "W". + Check if the signal is fitted properly after pressing key "W". Events: - Open 'FileWidget' with valid measurement. - Create a plot window and load 2 signals @@ -627,7 +625,7 @@ def test_Plot_Plot_Shortcut_Key_W(self): - Press key "W" Evaluate: - Evaluate that window is created - - Evaluate that there are at least one column with first signal color + - Evaluate that there is at least one column with first signal color - Evaluate first and last columns where is first signal: > first column after pressing "I" is full black => signal colors are not there > signal is zoomed => is extended to left side => last column contain signal color @@ -639,7 +637,7 @@ def test_Plot_Plot_Shortcut_Key_W(self): # search first and last column where is displayed first signal extremesOfChannel_35 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_35.color.name(), 'x' + self.plot.plot.viewport().grab(), self.channel_35.color.name(), "x" ) # Evaluate that there are extremes of first signal self.assertTrue(extremesOfChannel_35) @@ -856,7 +854,7 @@ def test_Plot_Plot_Shortcut_Key_X(self): self.processEvents() # Find where signal start and end on X axes - from_to_x = Pixmap.search_signal_from_to(self.plot.plot.viewport().grab(), self.channel_35.color.name(), 'x') + from_to_x = Pixmap.search_signal_from_to(self.plot.plot.viewport().grab(), self.channel_35.color.name(), "x") self.assertEqual(len(from_to_x), 2) # Search lines where signal start and end signalStartOnLine = Pixmap.search_y_of_signal_in_x( @@ -1053,7 +1051,6 @@ def test_Plot_Plot_Shortcut_Key_Alt_R_Alt_S(self): class TestShortcutsWith_2_Channels(TestPlotWidget): - def setUp(self): # Open measurement file self.setUpFileWidget(measurement_file=self.measurement_file, default=True) @@ -1189,16 +1186,16 @@ def test_Plot_Plot_Shortcut_Key_Shift_Arrows(self): QtTest.QTest.keyClick(self.plot.plot.viewport(), QtCore.Qt.Key_S) self.processEvents() old_from_to_y_channel_36 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_36.color.name(), 'y' + self.plot.plot.viewport().grab(), self.channel_36.color.name(), "y" ) old_from_to_y_channel_37 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_37.color.name(), 'y' + self.plot.plot.viewport().grab(), self.channel_37.color.name(), "y" ) old_from_to_x_channel_36 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_36.color.name(), 'x' + self.plot.plot.viewport().grab(), self.channel_36.color.name(), "x" ) old_from_to_x_channel_37 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_37.color.name(), 'x' + self.plot.plot.viewport().grab(), self.channel_37.color.name(), "x" ) self.mouseClick_WidgetItem(self.channel_36) @@ -1217,16 +1214,16 @@ def test_Plot_Plot_Shortcut_Key_Shift_Arrows(self): self.processEvents() new_from_to_y_channel_36 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_36.color.name(), 'y' + self.plot.plot.viewport().grab(), self.channel_36.color.name(), "y" ) new_from_to_y_channel_37 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_37.color.name(), 'y' + self.plot.plot.viewport().grab(), self.channel_37.color.name(), "y" ) new_from_to_x_channel_36 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_36.color.name(), 'x' + self.plot.plot.viewport().grab(), self.channel_36.color.name(), "x" ) new_from_to_x_channel_37 = Pixmap.search_signal_from_to( - self.plot.plot.viewport().grab(), self.channel_37.color.name(), 'x' + self.plot.plot.viewport().grab(), self.channel_37.color.name(), "x" ) # Evaluate @@ -1296,7 +1293,6 @@ def test_Plot_Channel_Selection_Shortcut_Key_C(self): class TestShortcutsWith_3_Channels(TestPlotWidget): - def setUp(self): # Open measurement file self.setUpFileWidget(measurement_file=self.measurement_file, default=True)