]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Updating the tests : reconstruction of the baselines; modification of the CMakeLists...
authorjh777916 <juba.hamma@cea.fr>
Fri, 6 Oct 2023 11:57:16 +0000 (13:57 +0200)
committerjh777916 <juba.hamma@cea.fr>
Fri, 6 Oct 2023 11:57:16 +0000 (13:57 +0200)
69 files changed:
tools/CurvePlot/src/python/test/CMakeLists.txt
tools/CurvePlot/src/python/test/PlotTestBase.py
tools/CurvePlot/src/python/test/baselines/testAddCurve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testAddCurveAppend.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testAddCurveAppend_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testAddCurve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testAddPlotSet.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testAddPlotSet_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testClearPlotSet.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testClearPlotSet2.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testClearPlotSet2_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testClearPlotSet_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testCopyCurve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testCopyCurve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve1.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve1_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve2.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve2_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve3.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeleteCurve3_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testExtendCurve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testExtendCurve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testLockRepaint.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testLockRepaint_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testResetCurve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testResetCurve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurveLabel.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurveLabel_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetCurveMarker.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetCurveMarker_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetLabelX.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetLabelX_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetLabelY.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetLabelY_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetLegendVisible.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetLegendVisible_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetXSciNotation.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetXSciNotation_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSetYSciNotation.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSetYSciNotation_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testToggleXLog.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testToggleXLog_a.png [deleted file]
tools/CurvePlot/src/python/test/baselines/testToggleYLog.png [new file with mode: 0644]
tools/CurvePlot/src/python/test/baselines/testToggleYLog_a.png [deleted file]
tools/CurvePlot/src/python/test/plot_test.py

index fd4c59f8121525e27dc0fa697c8e8820772c6173..a001435d47f19e630120638f8c59204fb5780851 100644 (file)
@@ -22,7 +22,6 @@ SALOME_CONFIGURE_FILE(SalomePyQt_MockUp.py.in mockup/SalomePyQt_MockUp.py)
 
 SET(_all_SCRIPTS
     PlotCurve_Standalone.py
-    plot_test.py
     TestDesktop.py
 )
 
@@ -33,18 +32,16 @@ SET(_test_SCRIPTS
 )
 
 SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
+# Needed for the PlotCurve_standalone.py script
 SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/mockup/SalomePyQt_MockUp.py ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
 SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/mockup/SalomePyQt_MockUp.py ${SALOME_CURVEPLOT_INSTALL_PYTHON})
 
-
-INSTALL(DIRECTORY baselines DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
-
+# For test purposes
 SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${CMAKE_BINARY_DIR}/local)  # point to local curveplot package in BUILD dir
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
-#ADD_TEST(CurvePlotUnitTests ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/plot_test.py)
-#SET_TESTS_PROPERTIES(CurvePlotUnitTests PROPERTIES ENVIRONMENT "${tests_env}")
+ADD_TEST(CurvePlotUnitTests ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/plot_test.py)
+SET_TESTS_PROPERTIES(CurvePlotUnitTests PROPERTIES ENVIRONMENT "${tests_env}")
 
-# For test purposes
 FILE(COPY ${_test_SCRIPTS} DESTINATION ${CRVPLOT_TEST_INSTALL})
 FILE(COPY baselines DESTINATION ${CRVPLOT_TEST_INSTALL})
index 77bdf343988a3a2c373f59523192d607035975ab..f8d854f2f6d2b01569c13664bb3779a42ac7471e 100644 (file)
@@ -95,14 +95,17 @@ class PlotTestBase(unittest.TestCase):
       self.tmpDir = None
 
     # Minimal UI setup:
-    self.app = QApplication(sys.argv)
-    desktop = TestDesktop(None)
-    self.sgPyQt = SalomePyQt(desktop)
-    desktop._sgPyQt = self.sgPyQt
-    desktop.initialize()
+    self.app = QApplication.instance()
+    if self.app is None:
+      self.app = QApplication(sys.argv)
+
+    self.desktop = TestDesktop(None)
+    self.sgPyQt = SalomePyQt(self.desktop)
+    self.desktop._sgPyQt = self.sgPyQt
+    self.desktop.initialize()
     self.plotController = PlotController.GetInstance(self.sgPyQt)
-    desktop.resize(800, 600)
-    desktop.show()
+    self.desktop.resize(800, 600)
+    self.desktop.show()
     self._execQtWasCalled = False # Used to automatically finish Qt execution loop on tests not doing a screenshot
 
     # Reset some class var to make sure IDs appearing in screenshots do not depend on test seq order:
@@ -130,8 +133,8 @@ class PlotTestBase(unittest.TestCase):
   def _execQt(self, withShot=False):
     if withShot:
       QTimer.singleShot(50, self._shotEvent)  # take picture
-    QTimer.singleShot(200, self.app.quit)    # quit
-    self.app.exec_()  # will hang till quit is fired
+    QTimer.singleShot(200, self._appQuit)    # quit
+    self.app.exit(self.app.exec())  # will hang till quit is fired
 
     # Important make sure previous app is properly killed before launching next test!
     # Qt doesn't like multiple running instance
@@ -146,6 +149,10 @@ class PlotTestBase(unittest.TestCase):
     self._execQt(withShot=True)
     return self.retValue
 
+  def _appQuit(self): 
+    self.desktop.destroy()
+    self.app.quit()
+
   def _shotEvent(self):
     self.retValue = self._snapAndCompare(self.saveW)
 
@@ -160,7 +167,7 @@ class PlotTestBase(unittest.TestCase):
     self.qpixmap = QPixmap(widget.size())
     widget.repaint()
     widget.render(self.qpixmap)
-    #self.qpixmap = widget.grab()
+    self.qpixmap = widget.grab()
 
     # Nothing to compare if rebuilding base lines, just saving file:
     if self.REBUILD_BASELINES:
@@ -169,8 +176,9 @@ class PlotTestBase(unittest.TestCase):
 
     gen_path = self.saveCurrentPix(self.tmpDir, suffix)
     base_ref = os.path.join(self._this_dir, self.__BASE_LINE_DIR, self.getTestName() + suffix)
+
     ret = False
-    for ref_path in glob.glob("%s_*.%s" % (base_ref, self.__FORMAT)):
+    for ref_path in glob.glob("%s.%s" % (base_ref, self.__FORMAT)):
       try:
         ret = filecmp.cmp(ref_path, gen_path, shallow=False)
         if ret:
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddCurve.png b/tools/CurvePlot/src/python/test/baselines/testAddCurve.png
new file mode 100644 (file)
index 0000000..bf29467
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testAddCurve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend.png b/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend.png
new file mode 100644 (file)
index 0000000..325d498
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend_a.png b/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend_a.png
deleted file mode 100644 (file)
index 0f251a0..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testAddCurveAppend_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddCurve_a.png b/tools/CurvePlot/src/python/test/baselines/testAddCurve_a.png
deleted file mode 100644 (file)
index 7964540..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testAddCurve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddPlotSet.png b/tools/CurvePlot/src/python/test/baselines/testAddPlotSet.png
new file mode 100644 (file)
index 0000000..6869612
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testAddPlotSet.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testAddPlotSet_a.png b/tools/CurvePlot/src/python/test/baselines/testAddPlotSet_a.png
deleted file mode 100644 (file)
index 6667d06..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testAddPlotSet_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet.png b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet.png
new file mode 100644 (file)
index 0000000..3222427
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2.png b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2.png
new file mode 100644 (file)
index 0000000..6869612
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2_a.png b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2_a.png
deleted file mode 100644 (file)
index 6667d06..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet2_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet_a.png b/tools/CurvePlot/src/python/test/baselines/testClearPlotSet_a.png
deleted file mode 100644 (file)
index 7e2f7ab..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testClearPlotSet_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testCopyCurve.png b/tools/CurvePlot/src/python/test/baselines/testCopyCurve.png
new file mode 100644 (file)
index 0000000..514d3b3
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testCopyCurve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testCopyCurve_a.png b/tools/CurvePlot/src/python/test/baselines/testCopyCurve_a.png
deleted file mode 100644 (file)
index be7e36e..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testCopyCurve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve.png
new file mode 100644 (file)
index 0000000..cad5c64
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve_a.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve_a.png
deleted file mode 100644 (file)
index c896b6f..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_curve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet.png
new file mode 100644 (file)
index 0000000..aece21d
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet_a.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet_a.png
deleted file mode 100644 (file)
index 43858ff..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeleteCurrentItem_plotSet_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1.png
new file mode 100644 (file)
index 0000000..7e7d8b8
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1_a.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1_a.png
deleted file mode 100644 (file)
index 744a6f5..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve1_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2.png
new file mode 100644 (file)
index 0000000..b184a7a
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2_a.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2_a.png
deleted file mode 100644 (file)
index 744a6f5..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve2_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3.png
new file mode 100644 (file)
index 0000000..687d0ce
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3_a.png b/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3_a.png
deleted file mode 100644 (file)
index 45ec73a..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeleteCurve3_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1.png b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1.png
new file mode 100644 (file)
index 0000000..3eba5c3
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1_a.png b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1_a.png
deleted file mode 100644 (file)
index 0d80b23..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet1_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2.png b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2.png
new file mode 100644 (file)
index 0000000..3eba5c3
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2_a.png b/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2_a.png
deleted file mode 100644 (file)
index 0d80b23..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testDeletePlotSet2_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testExtendCurve.png b/tools/CurvePlot/src/python/test/baselines/testExtendCurve.png
new file mode 100644 (file)
index 0000000..3baf88b
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testExtendCurve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testExtendCurve_a.png b/tools/CurvePlot/src/python/test/baselines/testExtendCurve_a.png
deleted file mode 100644 (file)
index ad04b34..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testExtendCurve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testLockRepaint.png b/tools/CurvePlot/src/python/test/baselines/testLockRepaint.png
new file mode 100644 (file)
index 0000000..7349cb4
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testLockRepaint.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testLockRepaint_a.png b/tools/CurvePlot/src/python/test/baselines/testLockRepaint_a.png
deleted file mode 100644 (file)
index 58fa9fc..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testLockRepaint_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable.png b/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable.png
new file mode 100644 (file)
index 0000000..77776e3
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable_a.png b/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable_a.png
deleted file mode 100644 (file)
index 4ac74a1..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testPlotCurveFromTable_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testResetCurve.png b/tools/CurvePlot/src/python/test/baselines/testResetCurve.png
new file mode 100644 (file)
index 0000000..a590a75
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testResetCurve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testResetCurve_a.png b/tools/CurvePlot/src/python/test/baselines/testResetCurve_a.png
deleted file mode 100644 (file)
index 2c1a0c3..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testResetCurve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve.png
new file mode 100644 (file)
index 0000000..1f3f9c3
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2.png
new file mode 100644 (file)
index 0000000..6b3c55f
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2_a.png
deleted file mode 100644 (file)
index 94d929b..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve2_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3.png
new file mode 100644 (file)
index 0000000..72af056
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3_a.png
deleted file mode 100644 (file)
index c896b6f..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve3_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve_a.png
deleted file mode 100644 (file)
index bfb41d6..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurrentCurve_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet.png
new file mode 100644 (file)
index 0000000..0afdf3f
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet_a.png
deleted file mode 100644 (file)
index 7b2ca2a..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurrentPlotSet_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel.png b/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel.png
new file mode 100644 (file)
index 0000000..5c56742
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel_a.png
deleted file mode 100644 (file)
index 0ae41d1..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurveLabel_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker.png b/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker.png
new file mode 100644 (file)
index 0000000..7edd952
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker_a.png b/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker_a.png
deleted file mode 100644 (file)
index a126ef8..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetCurveMarker_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLabelX.png b/tools/CurvePlot/src/python/test/baselines/testSetLabelX.png
new file mode 100644 (file)
index 0000000..492453e
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetLabelX.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLabelX_a.png b/tools/CurvePlot/src/python/test/baselines/testSetLabelX_a.png
deleted file mode 100644 (file)
index 08537db..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetLabelX_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLabelY.png b/tools/CurvePlot/src/python/test/baselines/testSetLabelY.png
new file mode 100644 (file)
index 0000000..7c266a7
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetLabelY.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLabelY_a.png b/tools/CurvePlot/src/python/test/baselines/testSetLabelY_a.png
deleted file mode 100644 (file)
index d917195..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetLabelY_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible.png b/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible.png
new file mode 100644 (file)
index 0000000..1d97b6e
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible_a.png b/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible_a.png
deleted file mode 100644 (file)
index 55e35a9..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetLegendVisible_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle.png b/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle.png
new file mode 100644 (file)
index 0000000..b839d05
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle_a.png b/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle_a.png
deleted file mode 100644 (file)
index 6920c01..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetPlotSetTitle_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation.png b/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation.png
new file mode 100644 (file)
index 0000000..0c4ef05
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation_a.png b/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation_a.png
deleted file mode 100644 (file)
index 649579c..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetXSciNotation_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation.png b/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation.png
new file mode 100644 (file)
index 0000000..27860e9
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation_a.png b/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation_a.png
deleted file mode 100644 (file)
index 3dc38aa..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSetYSciNotation_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor.png b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor.png
new file mode 100644 (file)
index 0000000..9694c46
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor_a.png b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor_a.png
deleted file mode 100644 (file)
index bdf2ac5..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveColor_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker.png b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker.png
new file mode 100644 (file)
index 0000000..32d5761
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker_a.png b/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker_a.png
deleted file mode 100644 (file)
index a5f8fe8..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testSettingsCurveMarker_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testToggleXLog.png b/tools/CurvePlot/src/python/test/baselines/testToggleXLog.png
new file mode 100644 (file)
index 0000000..83a71d6
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testToggleXLog.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testToggleXLog_a.png b/tools/CurvePlot/src/python/test/baselines/testToggleXLog_a.png
deleted file mode 100644 (file)
index 96319af..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testToggleXLog_a.png and /dev/null differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testToggleYLog.png b/tools/CurvePlot/src/python/test/baselines/testToggleYLog.png
new file mode 100644 (file)
index 0000000..7a13bdd
Binary files /dev/null and b/tools/CurvePlot/src/python/test/baselines/testToggleYLog.png differ
diff --git a/tools/CurvePlot/src/python/test/baselines/testToggleYLog_a.png b/tools/CurvePlot/src/python/test/baselines/testToggleYLog_a.png
deleted file mode 100644 (file)
index cdfe1e7..0000000
Binary files a/tools/CurvePlot/src/python/test/baselines/testToggleYLog_a.png and /dev/null differ
index a8bf16f0054c5fbfc5f0375f3689e3c7f2f9464d..34b79311ecdc41c6379cb14f43d0b0d50eab32af 100644 (file)
 # Author : A. Bruneton
 #
 from curveplot import *
-from curveplot.PlotTestBase import PlotTestBase, processDecorator
+from curveplot.PlotTestBase import PlotTestBase, processDecorator, runOnly
 from curveplot.PlotSettings import PlotSettings
 
 from pyqtside.QtWidgets import QApplication
 import sys
-qapp = QApplication(sys.argv)
 
 class PlotTest(PlotTestBase):
   """ Unit test suite for the curve plotter. The tests themselves are stored in this class,
@@ -140,6 +139,8 @@ class PlotTest(PlotTestBase):
   #
   # GUI tests
   #
+  #
+
   def testAddCurve(self):
     x, y = self.generateSine()
     tw = self.showTabWidget()
@@ -273,7 +274,7 @@ class PlotTest(PlotTestBase):
     x, y = self.generateSine()
     crvID, psID = PlotController.AddCurve(x, y, append=False)
     PlotController.SetCurrentCurve(crvID)
-    _, crvID2 = PlotController.AddCurve(x, y, append=False)  # in a new plot set
+    crvID2, _ = PlotController.AddCurve(x, y, append=False)  # in a new plot set
     PlotController.SetCurrentCurve(crvID2)
     # on first plot set curve should not be selected anymore
     PlotController.SetCurrentPlotSet(psID)
@@ -444,21 +445,21 @@ class PlotTest(PlotTestBase):
     x, y = self.generateExp()
     crvId, _ = PlotController.AddCurve(x, y)
     PlotController.RegisterCallback(fun)
-    PlotController.SetCurrentCurve(crvId)
+    PlotController.SetCurrentCurve(crvId) # callback is be called
     self.assertEqual(crvId, a_callb)
 
   def testDeleteCallback(self):
-    global a_callb
-    a_callb = 0
     def fun(crv_id):
       global a_callb
-      a_callb = crv_id
+      a_callb = 0
     self.showTabWidget()
     x, y = self.generateExp()
     crvId, _ = PlotController.AddCurve(x, y)
+    global a_callb
+    a_callb = crvId
     PlotController.RegisterCallback(fun)
     PlotController.ClearCallbacks()
-    PlotController.SetCurrentCurve(crvId)
+    PlotController.SetCurrentCurve(crvId) # callback won't be called
     _, _ = PlotController.AddCurve(x, y)
     self.assertEqual(crvId, a_callb)
 
@@ -512,7 +513,7 @@ class PlotTest(PlotTestBase):
     self.assertEqual(psID0, psID2)
     l, _ = PlotController.GetAllPlotSets()
     self.assertEqual(1, len(l))
-
 # Even if not in main:
 processDecorator(__name__)