Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ansys/dpf/core/operator_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def config_specification(self) -> ConfigSpecification:
"""
if self._config_specification is None:
self._config_specification = ConfigSpecification()
if self._internal_obj is not None:
num_options = self._api.operator_specification_get_num_config_options(self)
for i in range(num_options):
option_name = self._api.operator_specification_get_config_name(self, i)
Expand Down
10 changes: 10 additions & 0 deletions tests/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,16 @@ def test_generated_operator_config_specification_simple(server_type):
assert "id" in conf_spec["work_by_index"].document


def test_empty_specification(server_type):
op = dpf.core.dpf_operator.Operator("chunk_fc", server=server_type)
spec = op.specification
_ = spec.config_specification
_ = spec.properties
_ = spec.description
_ = spec.inputs
_ = spec.outputs


def test_operator_exception():
ds = dpf.core.DataSources(r"dummy/file.rst")
op = ops.result.displacement(data_sources=ds)
Expand Down
Loading