X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FTest%2FtestMEDReader19.py;h=79d4dd78efe193a65db69498338cb5e0d9c848b0;hb=7f73f7630e2938bcd12c9736c95ab0b72ec8a072;hp=1181adf9793022e6228d0198b9de0e7aa92285d9;hpb=5f1e84825f2fddd153c8cca6ed09422639691317;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/Test/testMEDReader19.py b/src/Plugins/MEDReader/Test/testMEDReader19.py index 1181adf9..79d4dd78 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader19.py +++ b/src/Plugins/MEDReader/Test/testMEDReader19.py @@ -1,3 +1,24 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2015-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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author : Anthony Geay + from MEDLoader import * """ This is a non regression bug revealed during training session. The bug is linked to the native Threshold VTK filter. Corrected with PV version >= 4.4. (KW10658) @@ -23,9 +44,9 @@ mm.write(fname,2) # #### import the simple module from the paraview from paraview.simple import * +import vtk.test.Testing # this line must be here. If not SIGSEGV ! KW10658 #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() - # create a new 'MED Reader' testMEDReader19med = MEDReader(FileName=fname) testMEDReader19med.AllArrays = ['TS0/mesh/ComSup0/mesh@@][@@P0'] @@ -56,14 +77,6 @@ extractCellType1Display = Show(extractCellType1, renderView1) # trace defaults for the display properties. extractCellType1Display.ColorArrayName = [None, ''] extractCellType1Display.ScalarOpacityUnitDistance = 0.5 -extractCellType1Display.OpacityArray = [None, ''] -extractCellType1Display.RadiusArray = [None, ''] -extractCellType1Display.RadiusRange = [0.2, 0.7] -extractCellType1Display.ConstantRadius = 0.7 -extractCellType1Display.PointSpriteDefaultsInitialized = 1 -extractCellType1Display.SelectInputVectors = [None, ''] -extractCellType1Display.WriteLog = '' - renderView1.InteractionMode = '2D' renderView1.CameraPosition = [0.2, 0.2, 10000.0] @@ -73,7 +86,7 @@ renderView1.CameraParallelScale = 0.7071067811865476 res=servermanager.Fetch(extractCellType1,0) assert(res.GetBlock(0).GetNumberOfCells()==2) # problem was here in PV4.3.1 -"""# compare with baseline image # Waiting KW return to uncomment this part because SIGSEGV in PV5. +# compare with baseline image # Waiting KW return to uncomment this part because SIGSEGV in PV5. import os import sys try: @@ -85,6 +98,5 @@ except: baseline_file = os.path.join(baselinePath, imgName) 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() -"""