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
6 changes: 3 additions & 3 deletions flow360/component/simulation/validation/validation_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
for item in output.output_fields.items:
if isinstance(item, str) and item in invalid_output_fields[turbulence_model]:
raise ValueError(
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
f" output field when using turbulence model: {turbulence_model}."
)

Expand All @@ -126,7 +126,7 @@ def _check_output_fields_valid_given_turbulence_model(params):
and entity.field in invalid_output_fields[turbulence_model]
):
raise ValueError(
f"In `outputs`[{output_index}] {output.output_type}:, {entity.field} is not a valid"
f"In `outputs`[{output_index}] {output.output_type}: {entity.field} is not a valid"
f" iso field when using turbulence model: {turbulence_model}."
)
return params
Expand Down Expand Up @@ -159,7 +159,7 @@ def _check_output_fields_valid_given_transition_model(params):
for item in output.output_fields.items:
if isinstance(item, str) and item in transition_output_fields:
raise ValueError(
f"In `outputs`[{output_index}] {output.output_type}:, {item} is not a valid"
f"In `outputs`[{output_index}] {output.output_type}: {item} is not a valid"
f" output field when transition model is not used."
)
return params
Expand Down
12 changes: 6 additions & 6 deletions tests/simulation/params/test_validators_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_turbulence_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] IsosurfaceOutput:, kOmega is not a valid output field when using turbulence model: None."
"In `outputs`[0] IsosurfaceOutput: kOmega is not a valid output field when using turbulence model: None."
),
):
with imperial_unit_system:
Expand All @@ -117,7 +117,7 @@ def test_turbulence_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] IsosurfaceOutput:, nuHat is not a valid iso field when using turbulence model: kOmegaSST."
"In `outputs`[0] IsosurfaceOutput: nuHat is not a valid iso field when using turbulence model: kOmegaSST."
),
):
with imperial_unit_system:
Expand All @@ -135,7 +135,7 @@ def test_turbulence_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] VolumeOutput:, kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
"In `outputs`[0] VolumeOutput: kOmega is not a valid output field when using turbulence model: SpalartAllmaras."
),
):
with imperial_unit_system:
Expand All @@ -149,7 +149,7 @@ def test_transition_model_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] IsosurfaceOutput:, solutionTransition is not a valid output field when transition model is not used."
"In `outputs`[0] IsosurfaceOutput: solutionTransition is not a valid output field when transition model is not used."
),
):
with imperial_unit_system:
Expand All @@ -167,7 +167,7 @@ def test_transition_model_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] SurfaceProbeOutput:, residualTransition is not a valid output field when transition model is not used."
"In `outputs`[0] SurfaceProbeOutput: residualTransition is not a valid output field when transition model is not used."
),
):
with imperial_unit_system:
Expand All @@ -186,7 +186,7 @@ def test_transition_model_enabled_output_fields():
with pytest.raises(
ValueError,
match=re.escape(
"In `outputs`[0] VolumeOutput:, linearResidualTransition is not a valid output field when transition model is not used."
"In `outputs`[0] VolumeOutput: linearResidualTransition is not a valid output field when transition model is not used."
),
):
with imperial_unit_system:
Expand Down