From ec606f0b149693192d92ecc7be9c749ed2b7fde4 Mon Sep 17 00:00:00 2001 From: akl Date: Fri, 16 May 2014 09:18:19 +0400 Subject: [PATCH] Fix of failed tests. --- test/VisuPrs/Util/paravistest.py | 17 ++++++----------- test/VisuPrs/bugs/A6.py | 4 ++-- test/VisuPrs/imps/A1.py | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/test/VisuPrs/Util/paravistest.py b/test/VisuPrs/Util/paravistest.py index f63f3ea4..a3569df3 100755 --- a/test/VisuPrs/Util/paravistest.py +++ b/test/VisuPrs/Util/paravistest.py @@ -241,26 +241,21 @@ def TimeStampId(proxy): Originally defined in KERNEL_TEST/Tools/CommonFunctions file. """ import presentations - mesh_name = presentations.get_mesh_names(proxy).pop() + mesh_name = presentations.get_mesh_full_names(proxy).pop() iterations = {} # get list of field names - fields_on_points = list(proxy.PointArrays) - fields_on_cells = list(proxy.CellArrays) - all_fields = fields_on_points + fields_on_cells + all_fields = proxy.GetProperty("FieldsTreeInfo")[::2] # get timestamps timestamps = proxy.TimestepValues.GetData() timestamp_nb = len(timestamps) for field in all_fields: - entity = None - if fields_on_points.count(field) > 0: - entity = presentations.EntityType.NODE - elif fields_on_cells.count(field) > 0: - entity = presentations.EntityType.CELL - - iterations[field] = [entity, timestamp_nb] + entity = presentations.get_field_entity(field) + field_short_name = presentations.get_field_short_name(field) + + iterations[field_short_name] = [entity, timestamp_nb] return mesh_name, iterations diff --git a/test/VisuPrs/bugs/A6.py b/test/VisuPrs/bugs/A6.py index 9d42a523..ee43def8 100644 --- a/test/VisuPrs/bugs/A6.py +++ b/test/VisuPrs/bugs/A6.py @@ -43,8 +43,8 @@ else: print "OK" # 2. Create mesh -mesh_names = get_mesh_names(med_reader) -for mesh_name in mesh_names: +mesh_names = get_mesh_full_names(med_reader) +for mesh_name in [get_field_short_name(name) for name in mesh_names]: print "Mesh name: ", mesh_name mesh = MeshOnEntity(med_reader, mesh_name, EntityType.CELL) if mesh is None: diff --git a/test/VisuPrs/imps/A1.py b/test/VisuPrs/imps/A1.py index ed69077c..1bf50334 100644 --- a/test/VisuPrs/imps/A1.py +++ b/test/VisuPrs/imps/A1.py @@ -80,7 +80,7 @@ select_cells_with_data(med_reader, on_cells=["scalar field", "vectoriel field"]) print "Setting of deformation:" warp_vector = pvsimple.WarpByVector(cutplanes.Input) -warp_vector.Vectors = ["vectoriel field"] +warp_vector.Vectors = ["scalar field"] warp_vector.ScaleFactor = 5.0 print "Got scale : ", warp_vector.ScaleFactor -- 2.39.2