Skip to content

Commit

Permalink
Harmonized error message with bbn sources
Browse files Browse the repository at this point in the history
  • Loading branch information
ansaminard committed Dec 9, 2024
1 parent 9c30b8e commit 67c9e94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/ansys/sound/core/sound_composer/source_harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def source_harmonics(self, source: FieldsContainer):
support_values = support_data.field_support_by_property(support_properties[0])
if len(support_values) != len(source):
raise PyAnsysSoundException(
"Harmonics source must contain the same number of order levels and associated "
"control parameter values (the number of fields should be the same as the "
"number of support values, in the provided DPF fields container)."
"Harmonics source must contain as many order levels as the number of values "
"in the associated control parameter (in the provided DPF fields container, "
"the number of fields should be the same as the number of values in the "
"fields container support)."
)

self.__source_harmonics = source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def test_source_harmonics_properties_exceptions(dpf_sound_test_server):
with pytest.raises(
PyAnsysSoundException,
match=(
"Harmonics source must contain the same number of order levels and associated control "
"parameter values \\(the number of fields should be the same as the number of support "
"values, in the provided DPF fields container\\)."
"Harmonics source must contain as many order levels as the number of values in the "
"associated control parameter \\(in the provided DPF fields container, the number of "
"fields should be the same as the number of values in the fields container support\\)."
),
):
source_harmonics_obj.source_harmonics = fc_source_harmonics
Expand Down

0 comments on commit 67c9e94

Please sign in to comment.