Salome HOME
ExtractGroup is now a multiblock filter and not an unstructured like MEDReader. For...
[modules/paravis.git] / src / Plugins / MEDReader / Test / testMEDReader6.py
index ec4680f1b765192fec078c7cf16d040983deb0c6..1a76bfe93c36bbd6cd41dbba95b75e4de5deb7d8 100644 (file)
@@ -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
@@ -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()