From 956c3591de4124d7f728534c45fe39701ae306e0 Mon Sep 17 00:00:00 2001 From: Drew Winstel Date: Sun, 19 Nov 2023 06:23:58 -0600 Subject: [PATCH] Update shell test regex to support macOS development 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. --- tests/test_shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_shell.py b/tests/test_shell.py index 56a14c7..e09e44f 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -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")