Salome HOME
Merge Python 3 porting.
[modules/paravis.git] / src / Plugins / MEDReader / Test / testMEDReader15.py
index a68d7010a33c8128526ab600c0cd76ce9d97cec5..3902efdefbf627d4d83228cee1f7d5aa983947f2 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  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
@@ -61,14 +61,12 @@ zeNameLUT.VectorMode = 'Component'
 glyph1Display=Show(glyph1,renderView1)
 glyph1Display.ColorArrayName = ['POINTS', 'FamilyIdNode']
 glyph1Display.LookupTable = zeNameLUT
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
 # set scalar coloring
 ColorBy(glyph1Display, ('POINTS', 'zeName'))
 # rescale color and/or opacity maps used to include current data range
 glyph1Display.RescaleTransferFunctionToDataRange(True)
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
+# do not show color bar/color legend
+glyph1Display.SetScalarBarVisibility(renderView1, False)
 #
 renderView1.ViewSize =[300,300]
 renderView1.GetRenderWindow().DoubleBufferOff()
@@ -81,11 +79,11 @@ try:
   baselineIndex = sys.argv.index('-B')+1
   baselinePath = sys.argv[baselineIndex]
 except:
-  print "Could not get baseline directory. Test failed."
+  print("Could not get baseline directory. Test failed.")
   exit(1)
 baseline_file = os.path.join(baselinePath, "testMEDReader15.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)
+                                                            threshold=1)
 vtk.test.Testing.interact()