mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
test/contrib: Fix invalid escapes in regex strings
Flagged by flake8 v3.6.0, as W605, plus a few others identified incidentally, e.g. 59ffecf66cf4d08c4b431e457b083878d66a3fd6. Note that r"\n" matches to "\n" under re.match/search.
This commit is contained in:
@ -36,7 +36,7 @@ class LoggingTest(BitcoinTestFramework):
|
||||
invdir = self.relative_log_path("foo")
|
||||
invalidname = os.path.join("foo", "foo.log")
|
||||
self.stop_node(0)
|
||||
exp_stderr = "Error: Could not open debug log file \S+$"
|
||||
exp_stderr = r"Error: Could not open debug log file \S+$"
|
||||
self.nodes[0].assert_start_raises_init_error(["-debuglogfile=%s" % (invalidname)], exp_stderr, match=ErrorMatch.FULL_REGEX)
|
||||
assert not os.path.isfile(os.path.join(invdir, "foo.log"))
|
||||
|
||||
|
Reference in New Issue
Block a user