X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader14.py;h=ac0ea5c3990803d0672d745ddc67d9eaf4992c50;hb=aca1d12b1c75afad8ed53308b3c4a7d6cc826a79;hp=6825c75b99519e7f202795228e4cefbecdfc96e1;hpb=31d34817a44169e8915cd71e43c0b83b0c4b68d5;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader14.py b/src/Plugins/MEDReader/Test/testMEDReader14.py index 6825c75b..ac0ea5c3 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader14.py +++ b/src/Plugins/MEDReader/Test/testMEDReader14.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 @@ -154,6 +154,23 @@ renderView1.InteractionMode = '2D' renderView1.CameraPosition = [3.0, 2.0, 10000.0] renderView1.CameraFocalPoint = [3.0, 2.0, 0.0] renderView1.ViewSize =[300,300] +renderView1.GetRenderWindow().DoubleBufferOff() # + Render() -WriteImage(outImgName) + +# 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, "testMEDReader14.png") +import vtk.test.Testing +vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir() +vtk.test.Testing.compareImage(renderView1.GetRenderWindow(), baseline_file, + threshold=25) +vtk.test.Testing.interact()