]> SALOME platform Git repositories - modules/paravis.git/blobdiff - src/Plugins/MEDReader/Test/testMEDReader4.py
Salome HOME
1st step.
[modules/paravis.git] / src / Plugins / MEDReader / Test / testMEDReader4.py
index f943e4705efb524382e7171ef143a1557a5e6f55..4b0541ed617458c7e75a4f9443ecfa647d1454bf 100644 (file)
@@ -92,4 +92,20 @@ RenderView1.CameraFocalPoint = [0.8087292125440382, 1.3325993334207897, 0.0]
 RenderView1.CameraParallelScale = 3.712804729456109
 
 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, "testMEDReader4.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()