benchmark script tests: make the match string for invalid option errors more flexible

Because the actual output depends on the python version

(cherry picked from commit ce86f65272)
This commit is contained in:
Erik Eckstein
2025-07-25 15:21:49 +02:00
committed by Azharuddin Mohammed
parent 49953edce0
commit 2f1e761c90
2 changed files with 2 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ class Test_parse_args(unittest.TestCase):
[
"error:",
"argument -o/--optimization: invalid choice: 'bogus'",
"(choose from 'O', 'Onone', 'Osize')",
"(choose from ",
],
err.getvalue(),
)

View File

@@ -860,7 +860,7 @@ class Test_parse_args(unittest.TestCase):
)
self.assertIn(
"error: argument --format: invalid choice: 'bogus' "
"(choose from 'markdown', 'git', 'html')",
"(choose from ",
err.getvalue(),
)