# HG changeset patch # User Mads Kiilerich # Date 1705006735 -3600 # Node ID 4f0fad8da04cb76b8e2ee808fe26a50fa6716dad # Parent e679697a6ca4c9620e0a48b5bd7ef4fd3eff5381 tests: pass re.MULTILINE to re.sub as 'flags' - not in 'count' position This bug was caught by the new Python 3.13 warning: DeprecationWarning: 'count' is passed as positional argument diff -r e679697a6ca4 -r 4f0fad8da04c tests/test-doctest.py --- a/tests/test-doctest.py Mon Jun 26 21:31:41 2023 +0200 +++ b/tests/test-doctest.py Thu Jan 11 21:58:55 2024 +0100 @@ -21,9 +21,11 @@ r'''^mercurial\.\w+\.(\w+): (['"])(.*?)\2''', r'\1: \3', got2, - re.MULTILINE, + flags=re.MULTILINE, ) - got2 = re.sub(r'^mercurial\.\w+\.(\w+): ', r'\1: ', got2, re.MULTILINE) + got2 = re.sub( + r'^mercurial\.\w+\.(\w+): ', r'\1: ', got2, flags=re.MULTILINE + ) return any( doctest.OutputChecker.check_output(self, w, g, optionflags) for w, g in [(want, got), (want2, got2)]