X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader10.py;h=2e27d447dfa66e1d2a1767b32ceed8342079047f;hb=e54758a2008aa21844f649b1379360bf1a1ee61c;hp=1fb42ff26a3726c01382ef33602de356218ca52c;hpb=b5ff7fd2e785e56a282f7aea26fec9a12d6e6d7a;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader10.py b/src/Plugins/MEDReader/Test/testMEDReader10.py index 1fb42ff2..2e27d447 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader10.py +++ b/src/Plugins/MEDReader/Test/testMEDReader10.py @@ -1,10 +1,10 @@ # -*- 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 # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -109,4 +109,20 @@ RenderView1.CameraClippingRange = [4.164482329590951, 9.24583527085017] RenderView1.CameraFocalPoint = [1.4999999999999996, 0.49999999999999944, 0.4999999999999996] # 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, "testMEDReader10.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()