From: vsr Date: Thu, 15 May 2014 13:01:34 +0000 (+0400) Subject: Fix problems in tests X-Git-Tag: V7_4_0rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6a9491235040ca2d5eb21805bf73d4f88feddfe4;p=modules%2Fparavis.git Fix problems in tests --- diff --git a/src/PV_SWIG/VTKWrapping/presentations.py b/src/PV_SWIG/VTKWrapping/presentations.py index 34d0fb2e..527728d5 100644 --- a/src/PV_SWIG/VTKWrapping/presentations.py +++ b/src/PV_SWIG/VTKWrapping/presentations.py @@ -797,10 +797,11 @@ def select_cells_with_data(proxy, on_points=[], on_cells=[], on_gauss=[]): types with data for even one field (from available) will be selected. """ + if not proxy.GetProperty("FieldsTreeInfo"): + return + proxy.UpdatePipeline() if not hasattr(proxy, 'Entity'): - separator = proxy.GetProperty("Separator").GetData() - fields_info = proxy.GetProperty("FieldsTreeInfo")[::2] arr_name_with_dis=[elt.split("/")[-1] for elt in fields_info] @@ -809,11 +810,11 @@ def select_cells_with_data(proxy, on_points=[], on_cells=[], on_gauss=[]): fields = [] for name in on_gauss: - fields.append(name+separator+'GAUSS') + fields.append(name+_med_field_sep+'GAUSS') for name in on_cells: - fields.append(name+separator+'P0') + fields.append(name+_med_field_sep+'P0') for name in on_points: - fields.append(name+separator+'P1') + fields.append(name+_med_field_sep+'P1') field_list = [] for name in fields: @@ -2538,7 +2539,6 @@ def CreatePrsForFile(paravis_instance, file_name, prs_types, print "FAILED" else: proxy.UpdatePipeline() - _med_field_sep = proxy.GetProperty("Separator") print "OK" except: print "FAILED"