From 568ce9cce9391a73eae184adf1f4fc7b656352ee Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 22 Feb 2020 01:15:50 +0100 Subject: [PATCH] tests: re-harden test_remote_usage_prog The meaning of the test is to check that "prog" is not "-c", which was weakened in 93780dccc. --- testing/test_remote.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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", + ] + )