X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader3.py;h=be1515d8fb0b9bba4ea4f381d791a3a334cbce45;hb=a741b2ebf9a2b28e453ed2021e4cfd32a48502c8;hp=15b4fd83a087bd7766408b2688e784050ec0fd5b;hpb=314a6ae6cba04133686795b8aba0eb15b9662318;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader3.py b/src/Plugins/MEDReader/Test/testMEDReader3.py index 15b4fd83..be1515d8 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader3.py +++ b/src/Plugins/MEDReader/Test/testMEDReader3.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D +# Copyright (C) 2007-2015 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 @@ -115,7 +115,30 @@ a1_ANodeField_PVLookupTable.ScalarOpacityFunction=a1_ANodeField_PiecewiseFunctio DataRepresentation2.ScalarOpacityFunction=a1_ANodeField_PiecewiseFunction DataRepresentation2.ColorArrayName='ANodeField' DataRepresentation2.LookupTable=a1_ANodeField_PVLookupTable -### -WriteImage(outImgName) +# Triangulate so rendring always the same with different gpu or graphic backend. +extSurf = ExtractSurface(Input=testMEDReader3) +triangulate = Triangulate(Input=extSurf) +Hide(testMEDReader3, RenderView1) +Show(triangulate, RenderView1) +triangulate1Display = GetDisplayProperties(triangulate, view=RenderView1) +ColorBy(triangulate1Display, ('POINTS', 'ANodeField')) + +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, "testMEDReader3.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()