From d9d4ffc3728bd5ecf9e9fb061b52d52d7449fc2a Mon Sep 17 00:00:00 2001 From: Mainak Kundu Date: Fri, 29 Mar 2024 11:35:33 -0400 Subject: [PATCH] fix: some more nightly tests --- tests/parametric/test_parametric_workflow.py | 4 ++- tests/test_flobject.py | 29 ++------------------ tests/test_meshing_queries_fdl.py | 1 + tests/test_meshing_workflow.py | 7 ++--- 4 files changed, 8 insertions(+), 33 deletions(-) diff --git a/tests/parametric/test_parametric_workflow.py b/tests/parametric/test_parametric_workflow.py index c7072b2bbd8..26382b6ee87 100644 --- a/tests/parametric/test_parametric_workflow.py +++ b/tests/parametric/test_parametric_workflow.py @@ -96,7 +96,9 @@ def test_parametric_workflow(): 333.348727 ) assert base_dp.output_parameters["outlet-vel-avg-op"]() == pytest_approx(1.506855) - dp1_name = study1.design_points.create_1() + dp_names = set([*study1.design_points.keys()]) + study1.design_points.create_1() + dp1_name = set([*study1.design_points.keys()]).difference(dp_names).pop() dp1 = study1.design_points[dp1_name] dp1.input_parameters["inlet1_temp"] = 500 dp1.input_parameters["inlet1_vel"] = 1 diff --git a/tests/test_flobject.py b/tests/test_flobject.py index f82e4a57b91..c09d24cd0a3 100644 --- a/tests/test_flobject.py +++ b/tests/test_flobject.py @@ -745,34 +745,9 @@ def test_accessor_methods_on_settings_object_types(load_static_mixer_settings_on assert max_refinements.get_attr("max") == 1000000 -@pytest.mark.fluent_version("==23.1") +@pytest.mark.fluent_version("==24.1") @pytest.mark.codegen_required -def test_find_children_from_settings_root_231(load_static_mixer_settings_only): - setup_cls = load_static_mixer_settings_only.setup.__class__ - assert len(find_children(setup_cls())) >= 10000 - assert len(find_children(setup_cls(), "gen*")) >= 9 - assert set(find_children(setup_cls(), "general*")) >= { - "general", - "models/discrete_phase/general_settings", - "models/virtual_blade_model/disk/general", - } - assert set(find_children(setup_cls(), "general")) >= { - "general", - "models/virtual_blade_model/disk/general", - } - assert set(find_children(setup_cls(), "*gen")) >= { - "boundary_conditions/exhaust_fan/phase/p_backflow_spec_gen", - "boundary_conditions/exhaust_fan/p_backflow_spec_gen", - "boundary_conditions/outlet_vent/phase/p_backflow_spec_gen", - "boundary_conditions/outlet_vent/p_backflow_spec_gen", - "boundary_conditions/pressure_outlet/phase/p_backflow_spec_gen", - "boundary_conditions/pressure_outlet/p_backflow_spec_gen", - } - - -@pytest.mark.fluent_version("latest") -@pytest.mark.codegen_required -def test_find_children_from_settings_root_232(load_static_mixer_settings_only): +def test_find_children_from_settings_root(load_static_mixer_settings_only): setup_cls = load_static_mixer_settings_only.setup.__class__ assert len(find_children(setup_cls())) >= 10000 assert len(find_children(setup_cls(), "gen*")) >= 9 diff --git a/tests/test_meshing_queries_fdl.py b/tests/test_meshing_queries_fdl.py index 40386970818..99535b18c92 100644 --- a/tests/test_meshing_queries_fdl.py +++ b/tests/test_meshing_queries_fdl.py @@ -11,6 +11,7 @@ def pytest_approx(expected): return pytest.approx(expected=expected, rel=PYTEST_RELATIVE_TOLERANCE) +@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/2634") @pytest.mark.codegen_required @pytest.mark.nightly @pytest.mark.fluent_version(">=24.2") diff --git a/tests/test_meshing_workflow.py b/tests/test_meshing_workflow.py index 6d2b449b13f..a8b17cf8b5d 100644 --- a/tests/test_meshing_workflow.py +++ b/tests/test_meshing_workflow.py @@ -11,6 +11,7 @@ shared_watertight_workflow_session, ) +from ansys.fluent.core import examples from ansys.fluent.core.utils.fluent_version import FluentVersion @@ -435,11 +436,7 @@ def test_new_workflow_structure(new_mesh_session): @pytest.mark.codegen_required @pytest.mark.fluent_version(">=24.2") def test_new_2d_meshing_workflow(new_mesh_session): - # Import geometry - # import_file_name = examples.download_file( - # "mixing_elbow.pmdb", "pyfluent/mixing_elbow" - # ) - import_file_name = r"C:\ANSYSDev\PyFluent_Dev_01\pyfluent\NACA0012.fmd" + import_file_name = examples.download_file("NACA0012.fmd", "pyfluent/airfoils") meshing = new_mesh_session meshing.workflow.InitializeWorkflow(WorkflowType="2D Meshing") meshing.workflow.TaskObject["Load CAD Geometry"].Arguments.set_state(