Skip to content

Commit

Permalink
fixed tests voor test_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjalling-dejong committed Nov 19, 2024
1 parent 814ca05 commit 88461d3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,12 @@ def test_when_incorrect_args_then_systemexit_raised_with_expected_message(self):
mainArgs = [""]

# 2. Set up expectations
reason = "Not all arguments were given."
expectedMssg = "Error: {0}".format(reason)
expectedMssg = "Error: Not all arguments were given."

# 3. Run test
with pytest.raises(SystemExit) as pytest_wrapped_e:
with pytest.raises(SystemExit, match=expectedMssg):
main.main(mainArgs)

# 4. Verify expectations
assert isinstance(pytest_wrapped_e.type, SystemExit)
assert pytest_wrapped_e.value.code == expectedMssg

def test_when_incorrect_input_args_systemexit_raised_with_expected_message(self):
# 1. Set up test data
Expand Down

0 comments on commit 88461d3

Please sign in to comment.