X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader6.py;h=9b73ce292546594a96e2b3f42f7babc1a45fc6c9;hb=83e68ef1b0f94647b24e0774aa2db40e8233a225;hp=ec4680f1b765192fec078c7cf16d040983deb0c6;hpb=ebbd2915a22d111ae165c01dbdd7cd9b12848709;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader6.py b/src/Plugins/MEDReader/Test/testMEDReader6.py index ec4680f1..9b73ce29 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader6.py +++ b/src/Plugins/MEDReader/Test/testMEDReader6.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -47,7 +47,7 @@ fGauss.setGaussLocalizationOnType(NORM_TRI3,[0.,0.,1.,0.,0.,1.],[0.1,0.1,0.05,0. fGauss.setGaussLocalizationOnType(NORM_QUAD4,[-1.,-1.,1.,-1.,1.,1.,-1.,1.],[-0.9,-0.9,0.,0.,0.9,0.9],[0.2,0.3,0.5]) fGauss.setArray(DataArrayDouble([0.9,1.3,0.22,1.3,1.62,2.21,1.62,2.72,2.95,2.54,2.25,2.16,1.58,1.05,3.13,2.91,2.82,1.41,1.58,1.95,3.59,3.53,3.59,2.82,2.91,3.13,2.25,2.54,2.95])) fGauss.getArray().setInfoOnComponent(0,"C0") -fGauss.checkCoherency() +fGauss.checkConsistencyLight() # f1ts=MEDFileField1TS() f1ts.setFieldNoProfileSBT(fGauss) @@ -78,7 +78,6 @@ RenderView1.CameraFocalPoint = [1.5, 1.5, 0.0] RenderView1.CameraPosition = [1.5, 1.5, 10000.0] RenderView1.InteractionMode = '3D' RenderView1.CameraPosition = [1.5, 1.5, 8.196152422706632] -RenderView1.CameraClippingRange = [7.825640906782493, 8.682319698595558] RenderView1.CameraParallelScale = 2.1213203435596424 RenderView1.CenterOfRotation = [1.5, 1.5, 0.0] @@ -93,7 +92,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()