Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Sep 24, 2024
1 parent 05bd04d commit 224b0f0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/test_mapdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 224b0f0

Please sign in to comment.