From 224b0f0993de1925c76b327c66c88abae9354203 Mon Sep 17 00:00:00 2001 From: root <28149841+germa89@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:35:48 +0000 Subject: [PATCH] fix: test --- tests/test_mapdl.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index fc780be80c..93c0253fd4 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -1928,24 +1928,28 @@ def test_igesin_whitespace(mapdl, cleared, tmpdir): def test_save_on_exit(mapdl, cleared): with mapdl.non_interactive: - mapdl.exit(save=True) + mapdl.exit(save=True, fake_exit=True) + mapdl._exited = False # avoiding set exited on the class. lines = "\n".join(mapdl._stored_commands.copy()) assert "SAVE" in lines.upper() - mapdl._stored_commands = [""] # resetting - mapdl.prep7() + mapdl._stored_commands = [] # resetting + + mapdl.prep7() def test_save_on_exit_not(mapdl, cleared): with mapdl.non_interactive: - mapdl.exit(save=False) + mapdl.exit(save=False, fake_exit=True) + mapdl._exited = False # avoiding set exited on the class. lines = "\n".join(mapdl._stored_commands.copy()) assert "SAVE" not in lines.upper() - mapdl._stored_commands = [""] # resetting - mapdl.prep7() + mapdl._stored_commands = [] # resetting + + mapdl.prep7() def test_input_strings_inside_non_interactive(mapdl, cleared):