Skip to content

Commit fbb9d5b

Browse files
authored
Fix typo in validation error message (#1590)
1 parent 72c81ee commit fbb9d5b

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
@@ -115,7 +115,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
115115
for item in output.output_fields.items:
116116
if isinstance(item, str) and item in invalid_output_fields[turbulence_model]:
117117
raise ValueError(
118-
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
118+
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
119119
f" output field when using turbulence model: {turbulence_model}."
120120
)
121121

@@ -126,7 +126,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
126126
and entity.field in invalid_output_fields[turbulence_model]
127127
):
128128
raise ValueError(
129-
f"In `outputs`[{output_index}] {output.output_type}:, {entity.field} is not a valid"
129+
f"In `outputs`[{output_index}] {output.output_type}: {entity.field} is not a valid"
130130
f" iso field when using turbulence model: {turbulence_model}."
131131
)
132132
return params
@@ -159,7 +159,7 @@ def _check_output_fields_valid_given_transition_model(params):
159159
for item in output.output_fields.items:
160160
if isinstance(item, str) and item in transition_output_fields:
161161
raise ValueError(
162-
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
162+
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
163163
f" output field when transition model is not used."
164164
)
165165
return params

tests/simulation/params/test_validators_output.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def test_turbulence_enabled_output_fields():
9999
with pytest.raises(
100100
ValueError,
101101
match=re.escape(
102-
"In `outputs`[0] IsosurfaceOutput:, kOmega is not a valid output field when using turbulence model: None."
102+
"In `outputs`[0] IsosurfaceOutput: kOmega is not a valid output field when using turbulence model: None."
103103
),
104104
):
105105
with imperial_unit_system:
@@ -117,7 +117,7 @@ def test_turbulence_enabled_output_fields():
117117
with pytest.raises(
118118
ValueError,
119119
match=re.escape(
120-
"In `outputs`[0] IsosurfaceOutput:, nuHat is not a valid iso field when using turbulence model: kOmegaSST."
120+
"In `outputs`[0] IsosurfaceOutput: nuHat is not a valid iso field when using turbulence model: kOmegaSST."
121121
),
122122
):
123123
with imperial_unit_system:
@@ -135,7 +135,7 @@ def test_turbulence_enabled_output_fields():
135135
with pytest.raises(
136136
ValueError,
137137
match=re.escape(
138-
"In `outputs`[0] VolumeOutput:, kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
138+
"In `outputs`[0] VolumeOutput: kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
139139
),
140140
):
141141
with imperial_unit_system:
@@ -149,7 +149,7 @@ def test_transition_model_enabled_output_fields():
149149
with pytest.raises(
150150
ValueError,
151151
match=re.escape(
152-
"In `outputs`[0] IsosurfaceOutput:, solutionTransition is not a valid output field when transition model is not used."
152+
"In `outputs`[0] IsosurfaceOutput: solutionTransition is not a valid output field when transition model is not used."
153153
),
154154
):
155155
with imperial_unit_system:
@@ -167,7 +167,7 @@ def test_transition_model_enabled_output_fields():
167167
with pytest.raises(
168168
ValueError,
169169
match=re.escape(
170-
"In `outputs`[0] SurfaceProbeOutput:, residualTransition is not a valid output field when transition model is not used."
170+
"In `outputs`[0] SurfaceProbeOutput: residualTransition is not a valid output field when transition model is not used."
171171
),
172172
):
173173
with imperial_unit_system:
@@ -186,7 +186,7 @@ def test_transition_model_enabled_output_fields():
186186
with pytest.raises(
187187
ValueError,
188188
match=re.escape(
189-
"In `outputs`[0] VolumeOutput:, linearResidualTransition is not a valid output field when transition model is not used."
189+
"In `outputs`[0] VolumeOutput: linearResidualTransition is not a valid output field when transition model is not used."
190190
),
191191
):
192192
with imperial_unit_system:

0 commit comments

Comments
 (0)