Skip to content

Commit

Permalink
Update shell test regex to support macOS development (#46)
Browse files Browse the repository at this point in the history
Fixes #45 because the default shell on macOS returns
`/bin/sh: oof: command not found\n` which doesn't quite match the
regex provided.

After discussion with @iurisilvio, using a fairly lax regex which
just looks for "oof" followed by "not found" is good enough.
  • Loading branch information
drewbrew authored Nov 19, 2023
1 parent 295adee commit 27f1229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_shell_ok():


def test_shell_error():
with pytest.raises(shell.MigrateCIShellException, match="/bin/sh: 1: oof: not found\n"):
with pytest.raises(shell.MigrateCIShellException, match=r"oof.+not found"):
shell.exec("oof")


Expand Down

0 comments on commit 27f1229

Please sign in to comment.