diff tests/test-minirst.py @ 50304:805d4a462abb stable

py3: fix for Python 3.12 emitting SyntaxWarning on invalid escape sequences Mercurial became very noisy after https://github.com/python/cpython/commit/a60ddd31be7ff96a8189e7483bf1eb2071d2bddf , for example: $ python3.12 mercurial/store.py mercurial/store.py:406: SyntaxWarning: invalid escape sequence '\.' EXCLUDED = re.compile(b'.*undo\.[^/]+\.(nd?|i)$') This verbosity made some tests fail. The problems were mostly insufficiently escaped regexps, relying on the Python parser/scanner preserving invalid escape sequences.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 07 Mar 2023 16:45:54 +0100
parents 6000f5b25c9b
children
line wrap: on
line diff
--- a/tests/test-minirst.py	Tue Mar 07 16:25:51 2023 +0100
+++ b/tests/test-minirst.py	Tue Mar 07 16:45:54 2023 +0100
@@ -154,7 +154,7 @@
 
 debugformats('options', options)
 
-fields = b"""
+fields = br"""
 :a: First item.
 :ab: Second item. Indentation and wrapping
      is handled automatically.