Skip to content

Commit 6bebd03

Browse files
angranl-flexflow360-auto-hotfix-bot
authored andcommitted
Fix typo in validation error message (#1590)
1 parent eb4da5f commit 6bebd03

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

flow360/component/simulation/validation/validation_output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
116116
for item in output.output_fields.items:
117117
if isinstance(item, str) and item in invalid_output_fields[turbulence_model]:
118118
raise ValueError(
119-
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
119+
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
120120
f" output field when using turbulence model: {turbulence_model}."
121121
)
122122

@@ -127,7 +127,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
127127
and entity.field in invalid_output_fields[turbulence_model]
128128
):
129129
raise ValueError(
130-
f"In `outputs`[{output_index}] {output.output_type}:, {entity.field} is not a valid"
130+
f"In `outputs`[{output_index}] {output.output_type}: {entity.field} is not a valid"
131131
f" iso field when using turbulence model: {turbulence_model}."
132132
)
133133
return params
@@ -160,7 +160,7 @@ def _check_output_fields_valid_given_transition_model(params):
160160
for item in output.output_fields.items:
161161
if isinstance(item, str) and item in transition_output_fields:
162162
raise ValueError(
163-
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
163+
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
164164
f" output field when transition model is not used."
165165
)
166166
return params

tests/simulation/params/test_validators_output.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_turbulence_enabled_output_fields():
123123
with pytest.raises(
124124
ValueError,
125125
match=re.escape(
126-
"In `outputs`[0] IsosurfaceOutput:, kOmega is not a valid output field when using turbulence model: None."
126+
"In `outputs`[0] IsosurfaceOutput: kOmega is not a valid output field when using turbulence model: None."
127127
),
128128
):
129129
with imperial_unit_system:
@@ -141,7 +141,7 @@ def test_turbulence_enabled_output_fields():
141141
with pytest.raises(
142142
ValueError,
143143
match=re.escape(
144-
"In `outputs`[0] IsosurfaceOutput:, nuHat is not a valid iso field when using turbulence model: kOmegaSST."
144+
"In `outputs`[0] IsosurfaceOutput: nuHat is not a valid iso field when using turbulence model: kOmegaSST."
145145
),
146146
):
147147
with imperial_unit_system:
@@ -159,7 +159,7 @@ def test_turbulence_enabled_output_fields():
159159
with pytest.raises(
160160
ValueError,
161161
match=re.escape(
162-
"In `outputs`[0] VolumeOutput:, kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
162+
"In `outputs`[0] VolumeOutput: kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
163163
),
164164
):
165165
with imperial_unit_system:
@@ -173,7 +173,7 @@ def test_transition_model_enabled_output_fields():
173173
with pytest.raises(
174174
ValueError,
175175
match=re.escape(
176-
"In `outputs`[0] IsosurfaceOutput:, solutionTransition is not a valid output field when transition model is not used."
176+
"In `outputs`[0] IsosurfaceOutput: solutionTransition is not a valid output field when transition model is not used."
177177
),
178178
):
179179
with imperial_unit_system:
@@ -191,7 +191,7 @@ def test_transition_model_enabled_output_fields():
191191
with pytest.raises(
192192
ValueError,
193193
match=re.escape(
194-
"In `outputs`[0] SurfaceProbeOutput:, residualTransition is not a valid output field when transition model is not used."
194+
"In `outputs`[0] SurfaceProbeOutput: residualTransition is not a valid output field when transition model is not used."
195195
),
196196
):
197197
with imperial_unit_system:
@@ -210,7 +210,7 @@ def test_transition_model_enabled_output_fields():
210210
with pytest.raises(
211211
ValueError,
212212
match=re.escape(
213-
"In `outputs`[0] VolumeOutput:, linearResidualTransition is not a valid output field when transition model is not used."
213+
"In `outputs`[0] VolumeOutput: linearResidualTransition is not a valid output field when transition model is not used."
214214
),
215215
):
216216
with imperial_unit_system:

0 commit comments

Comments
 (0)