Fix bash test regex for Linux under WSL2. (#9475)

It fails with `Permission denied` and not `not found`. Both seem
reasonable.
This commit is contained in:
Predrag Gruevski 2023-08-19 09:27:14 -04:00 committed by GitHub
parent 0808949e54
commit be9bc62f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,9 @@ def test_incorrect_command_return_err_output() -> None:
"""Test optional returning of shell output on incorrect command."""
session = BashProcess(return_err_output=True)
output = session.run(["invalid_command"])
assert re.match(r"^/bin/sh:.*invalid_command.*not found.*$", output)
assert re.match(
r"^/bin/sh:.*invalid_command.*(?:not found|Permission denied).*$", output
)
@pytest.mark.skipif(