Salome HOME
vtk.util.misc.vtkGetTempDir + InsideOut->Invert
[modules/paravis.git] / src / Plugins / MEDReader / Test / testMEDReader20.py
index 46ded62f85d4b567cbc2b47ef0ac0aaf40ae9ee3..4ebc315e7be0f933f9fa21991d269a4fb5ddeef3 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2016  CEA/DEN, EDF R&D
+# Copyright (C) 2016, 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
@@ -100,8 +100,8 @@ ColorBy(testMEDReader20medDisplay, ('CELLS', 'Field'))
 # rescale color and/or opacity maps used to include current data range
 testMEDReader20medDisplay.RescaleTransferFunctionToDataRange(True)
 
-# show color bar/color legend
-testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, True)
+# do not show color bar/color legend
+testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, False)
 
 # get color transfer function/color map for 'Field'
 fieldLUT = GetColorTransferFunction('Field')
@@ -142,10 +142,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,png)
 import vtk.test.Testing
+from vtk.util.misc import vtkGetTempDir
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
-vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
+vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=1)
 vtk.test.Testing.interact()