SET(_all_SCRIPTS
PlotCurve_Standalone.py
plot_test.py
- TestDesktop.py
)
SET(_test_SCRIPTS
)
SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
-SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/mockup/SalomePyQt_MockUp.py ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
+SALOME_INSTALL_SCRIPTS("${_test_SCRIPTS}" ${SALOME_CURVEPLOT_INSTALL_PYTHON})
INSTALL(DIRECTORY baselines DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON}/tests)
from pyqtside.QtWidgets import QApplication
from pyqtside.QtCore import QTimer, QTranslator
-from TestDesktop import TestDesktop
-import SalomePyQt_MockUp
+from curveplot.TestDesktop import TestDesktop
+from curveplot.SalomePyQt_MockUp import SalomePyQt
desktop = None
x, y = dw.width()*0.25, dw.height()*0.7
desktop = TestDesktop(None)
- sgPyQt = SalomePyQt_MockUp.SalomePyQt(desktop)
+ sgPyQt = SalomePyQt(desktop)
sgPyQt.currentTabChanged.connect(activeViewChanged)
desktop._sgPyQt = sgPyQt
desktop.initialize()
def setUp(self):
import sys
- from mockup.SalomePyQt_MockUp import SalomePyQt
+ from curveplot.SalomePyQt_MockUp import SalomePyQt
from curveplot.TableModel import TableModel
from curveplot.CurveModel import CurveModel
from curveplot.XYPlotSetModel import XYPlotSetModel
- from TestDesktop import TestDesktop
+ from curveplot.TestDesktop import TestDesktop
self.qpixmap = None
self.keepDir = False
self.tmpDir = None
# Minimal UI setup:
- self.app = QApplication(sys.argv)
+ self.app = QApplication.instance() or QApplication(sys.argv)
desktop = TestDesktop(None)
self.sgPyQt = SalomePyQt(desktop)
desktop._sgPyQt = self.sgPyQt
# Author : A. Bruneton
#
from curveplot import *
-from PlotTestBase import PlotTestBase, processDecorator
+from curveplot.PlotTestBase import PlotTestBase, processDecorator
from curveplot.PlotSettings import PlotSettings
from pyqtside.QtWidgets import QApplication
def __init__(self, methodName):
PlotTestBase.__init__(self, methodName)
-
###
### Data generation
import numpy as np
x = np.arange(100)
y = np.sin(x*alpha/np.pi)
- print(1)
return x, y
def generateExp(self, alpha=1.0):
x, y = self.generateSine()
tw = self.showTabWidget()
PlotController.AddCurve(x, y, curve_label="My curve", x_label="Lèés X (unicode!)", y_label="Et des ŷ", append=False)
- self.assertTrue(self.areScreenshotEqual(tw), msg='Hello!')
+ self.assertTrue(self.areScreenshotEqual(tw))
def testAddCurveAppend(self):
x, y = self.generateSine()