diff --git a/testing/test_remote.py b/testing/test_remote.py index c9c4e30c..81c6adf9 100644 --- a/testing/test_remote.py +++ b/testing/test_remote.py @@ -286,4 +286,10 @@ def test(get_config_parser, request): result = testdir.runpytest_subprocess("-n1") assert result.ret == 1 - result.stdout.fnmatch_lines(["*usage: *", "*error: my_usage_error"]) + result.stdout.re_match_lines( + [ + "^> raise UsageError", + "^E .*UsageError: usage: (pytest.py|__main__.py)", + "^E (pytest.py|__main__.py): error: my_usage_error", + ] + )