Salome HOME
Increase image comparison threshold to 6 for MEDREADER_7
[modules/paravis.git] / src / Plugins / MEDReader / Test / testMEDReader20.py
index a63f90ff40fa6ec217550fbb00135f810f646461..9dc00d911b16d8e2ee2c71dd06bc451a9a66602a 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
@@ -21,6 +21,8 @@
 
 # non regression test that emulates https://ageay@git.salome-platform.org/gitpub/samples/datafiles.git Med/ResOK_0000.med
 # This test point error during commit efd9331a9455785d0f04b75 in PARAVIS
+# Commit of the correction : a4e89b15c2faff6341ab9c3d78abc in PARAVIS
+# Due to mistake in MEDReader, the family field array on nodes was deleted twice when changing time step
 
 from MEDLoader import *
 fname="testMEDReader20.med"
@@ -83,15 +85,6 @@ testMEDReader20medDisplay = Show(testMEDReader20med, renderView1)
 testMEDReader20medDisplay.ColorArrayName = [None, '']
 testMEDReader20medDisplay.GlyphType = 'Arrow'
 testMEDReader20medDisplay.ScalarOpacityUnitDistance = 4.664739046219201
-testMEDReader20medDisplay.SelectUncertaintyArray = [None, '']
-testMEDReader20medDisplay.UncertaintyTransferFunction = 'PiecewiseFunction'
-testMEDReader20medDisplay.OpacityArray = [None, '']
-testMEDReader20medDisplay.RadiusArray = [None, '']
-testMEDReader20medDisplay.RadiusRange = [0.0, 10.0]
-testMEDReader20medDisplay.ConstantRadius = 10.0
-testMEDReader20medDisplay.PointSpriteDefaultsInitialized = 1
-testMEDReader20medDisplay.SelectInputVectors = [None, '']
-testMEDReader20medDisplay.WriteLog = ''
 
 # reset view to fit data
 renderView1.ResetCamera()
@@ -101,26 +94,14 @@ renderView1.InteractionMode = '2D'
 renderView1.CameraPosition = [5.0, 0.5, 10000.0]
 renderView1.CameraFocalPoint = [5.0, 0.5, 0.0]
 
-# set scalar coloring
-ColorBy(testMEDReader20medDisplay, ('FIELD', 'vtkBlockColors'))
-
-# show color bar/color legend
-testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, True)
-
-# get color transfer function/color map for 'vtkBlockColors'
-vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors')
-
-# get opacity transfer function/opacity map for 'vtkBlockColors'
-vtkBlockColorsPWF = GetOpacityTransferFunction('vtkBlockColors')
-
 # set scalar coloring
 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')
@@ -166,5 +147,5 @@ except:
 baseline_file = os.path.join(baselinePath,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.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=1)
 vtk.test.Testing.interact()