File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,8 @@ def __repr__(self):
195195 @property
196196 def name (self ):
197197 """Result operator."""
198- if hasattr ( self , "properties" ) and "scripting_name" in self ._properties .keys ():
199- name = self .properties ["scripting_name" ]
198+ if self . _properties and "scripting_name" in self ._properties .keys ():
199+ name = self ._properties ["scripting_name" ]
200200 elif self .operator_name in _result_properties :
201201 name = _result_properties [self .operator_name ]["scripting_name" ]
202202 else :
Original file line number Diff line number Diff line change 2323import pytest
2424
2525from ansys import dpf
26- from ansys .dpf .core import Model
26+ from ansys .dpf .core import Model , examples
2727from conftest import (
2828 SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 ,
2929 SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_0 ,
@@ -303,3 +303,13 @@ def test_result_info_add_result(model):
303303 dimensions = None ,
304304 description = "description" ,
305305 )
306+
307+
308+ @pytest .mark .skipif (
309+ not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 , reason = "Available for servers >=8.0"
310+ )
311+ def test_scripting_name ():
312+ model = Model (examples .download_all_kinds_of_complexity_modal ())
313+ scripting_names = [res .name for res in model .metadata .result_info ]
314+ assert "nmisc" in scripting_names
315+ assert "smisc" in scripting_names
You can’t perform that action at this time.
0 commit comments