[PATCH 09 of 14] test-lock: manually disable path auditing after vfs creation
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Jul 2 02:56:34 UTC 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1498959433 -7200
# Sun Jul 02 03:37:13 2017 +0200
# Node ID d15514b41d39ddf23018787f5946f1df85458eaf
# Parent 5dd9c2cb6d1dbebc0a51662dd8dda9d4c3f933db
# EXP-Topic vfs.ward
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
# hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r d15514b41d39
test-lock: manually disable path auditing after vfs creation
The 'audit' parameter of the 'vfs' constructor has very few users. 'test-lock'
is one of the two left. Since it is a test, it seems fine to apply the no-audit
manually here.
This will let us simplify the 'vfs' constructor in a later changeset.
diff --git a/tests/test-lock.py b/tests/test-lock.py
--- a/tests/test-lock.py
+++ b/tests/test-lock.py
@@ -11,6 +11,7 @@ import unittest
from mercurial import (
error,
lock,
+ util,
vfs as vfsmod,
)
@@ -37,7 +38,9 @@ class teststate(object):
self._acquirecalled = False
self._releasecalled = False
self._postreleasecalled = False
- self.vfs = vfsmod.vfs(dir, audit=False)
+ self.vfs = vfsmod.vfs(dir)
+ # disable path auditing for the test
+ self.vfs.audit = util.always
self._pidoffset = pidoffset
def makelock(self, *args, **kwargs):
More information about the Mercurial-devel
mailing list