X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader6.py;h=1a76bfe93c36bbd6cd41dbba95b75e4de5deb7d8;hb=b705d58ad8589dde0c4d7fc673f1fb723c3f2ea5;hp=acdb1f56474b3a69da2935c7288e90256ee959d3;hpb=216b73d56a11d0b5f0ef26acfd85936f92c5f8ac;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader6.py b/src/Plugins/MEDReader/Test/testMEDReader6.py index acdb1f56..1a76bfe9 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader6.py +++ b/src/Plugins/MEDReader/Test/testMEDReader6.py @@ -93,7 +93,21 @@ DataRepresentation4.ColorArrayName = 'fGauss' DataRepresentation4.LookupTable = a1_fGauss_PVLookupTable a1_fGauss_PVLookupTable.ScalarOpacityFunction = a1_fGauss_PiecewiseFunction - RenderView1.ViewSize=[300,300] -WriteImage(outImgName) +Render() +# compare with baseline image +import os +import sys +try: + baselineIndex = sys.argv.index('-B')+1 + baselinePath = sys.argv[baselineIndex] +except: + print "Could not get baseline directory. Test failed." + exit(1) +baseline_file = os.path.join(baselinePath, "testMEDReader6.png") +import vtk.test.Testing +vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir() +vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, + threshold=25) +vtk.test.Testing.interact()