Skip to content

Commit

Permalink
Improving unit test for status (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Mar 14, 2022
1 parent 5a309a3 commit 3e1e901
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,5 +522,16 @@ def test_repr(mm):
assert mm._status == repr(mm)


def test_status(mm):
mm.status()
def test_status(mm, capsys):
assert mm.status() is None
captured = capsys.readouterr()
printed_output = captured.out

assert "APDLMATH PARAMETER STATUS-" in printed_output
assert all(
[each in printed_output for each in ["Name", "Type", "Dims", "Workspace"]]
)

# Checking also _status property
assert "APDLMATH PARAMETER STATUS-" in mm._status
assert all([each in mm._status for each in ["Name", "Type", "Dims", "Workspace"]])

0 comments on commit 3e1e901

Please sign in to comment.