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 .github/workflows/run-custom-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Run Custom Tests

on:
#pull_request:
workflow_dispatch:

concurrency:
Expand Down
14 changes: 8 additions & 6 deletions tests/parametric/test_parametric_workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pathlib import Path
import tempfile
import time

import pytest

Expand All @@ -10,13 +9,17 @@

@pytest.mark.nightly
@pytest.mark.fluent_version(">=23.2")
def test_parametric_workflow():
def test_parametric_workflow(monkeypatch: pytest.MonkeyPatch):
monkeypatch.setenv("PYFLUENT_CONTAINER_MOUNT_PATH", pyfluent.EXAMPLES_PATH)
save_path = tempfile.mkdtemp(dir=pyfluent.EXAMPLES_PATH)
import_filename = examples.download_file(
"Static_Mixer_main.cas.h5", "pyfluent/static_mixer", save_path=save_path
import_filepath = examples.download_file(
"Static_Mixer_main.cas.h5",
"pyfluent/static_mixer",
save_path=save_path,
return_only_filename=False,
)
solver_session = pyfluent.launch_fluent(processor_count=2, cwd=save_path)
solver_session.file.read_case(file_name=import_filename)
solver_session.file.read_case(file_name=import_filepath)
solver_session.solution.run_calculation.iter_count = 100
solver_session.tui.define.parameters.enable_in_TUI("yes")
solver_session.tui.define.boundary_conditions.set.velocity_inlet(
Expand Down Expand Up @@ -133,7 +136,6 @@ def test_parametric_workflow():
)
assert project_filename.exists()
solver_session.exit()
time.sleep(10)
solver_session = pyfluent.launch_fluent(processor_count=2, cwd=save_path)
solver_session.file.parametric_project.open(project_filename=str(project_filename))
solver_session.file.parametric_project.save()
Expand Down