diff mercurial/match.py @ 44005:d9d78e70149a

tests: fix failing doctest in match.py by adding dummy auditor It was failing with "OSError: [Errno 13] Permission denied: '/root/sub'". It has been failing since 8b1a9ba375e5 (match: make sure `root` argument is always an absolute path (API), 2019-12-13). I don't know why I didn't notice it before sending that patch. Differential Revision: https://phab.mercurial-scm.org/D7731
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 27 Dec 2019 09:55:35 -0800
parents 8a81fa44f7bb
children e685fac56693
line wrap: on
line diff
--- a/mercurial/match.py	Thu Jan 02 17:30:27 2020 -0800
+++ b/mercurial/match.py	Fri Dec 27 09:55:35 2019 -0800
@@ -945,7 +945,7 @@
     The paths are remapped to remove/insert the path as needed:
 
     >>> from . import pycompat
-    >>> m1 = match(util.localpath(b'/root'), b'', [b'a.txt', b'sub/b.txt'])
+    >>> m1 = match(util.localpath(b'/root'), b'', [b'a.txt', b'sub/b.txt'], auditor=lambda name: None)
     >>> m2 = subdirmatcher(b'sub', m1)
     >>> m2(b'a.txt')
     False