Closed NickVolynkin closed 1 year ago
It was merged so fast that I had no change to point to https://github.com/tarantool/test-run/pull/353#discussion_r997015987. Anyway, that's minor.
I didn't get it initially, but understood now.
^
(Caret.) Matches the start of the string, and in MULTILINE mode also matches immediately after each newline.
$
Matches the end of the string or just before the newline at the end of the string, and in MULTILINE mode also matches before a newline. <...>
https://docs.python.org/3/library/re.html
IOW, ^
and $
do not match start and end of a line without the multiline mode.
The problem was introduced in PR #353.
The
tarantool -v
output is a single multiline string. Flag re.MULTILINE is required to match it with start of line (^
) or end of line ($
) characters. The.*
in the middle of the pattern does not match start/end of lines, so this expression can not match something like this:The re.IGNORECASE is not required, because the build mode is always spelled in one particular way:
-Debug
.Follow-up to #352 Fixes #355
Co-authored-by: Serge Petrenko sergepetrenko@tarantool.org