path: mercurial_7.2-4/tests/test-lock.py self._postreleasecalled = False self.vfs = vfsmod.vfs(dir, audit=False) self._pidoffset = pidoffset def makelock(self, *args, **kwargs): path: mercurial_7.2-4/tests/test-lock.py class teststate: def __init__(self, testcase, dir, pidoffset=0): self._testcase = testcase self._acquirecalled = False path: mercurial_7.2-4/tests/test-lock.py class lockwrapper(lock.lock): def __init__(self, pidoffset, *args, **kwargs): # lock.lock.__init__() calls lock(), so the pidoffset assignment needs # to be earlier path: mercurial_7.2-4/tests/test-lock.py # lock.lock.__init__() calls lock(), so the pidoffset assignment needs # to be earlier self._pidoffset = pidoffset super().__init__(*args, **kwargs) path: mercurial_7.2-4/tests/test-lock.py class lockwrapper(lock.lock): def __init__(self, pidoffset, *args, **kwargs): # lock.lock.__init__() calls lock(), so the pidoffset assignment needs # to be earlier self._pidoffset = pidoffset path: mercurial_7.2-4/tests/test-lock.py def _getpid(self): return super()._getpid() + self._pidoffset path: mercurial_7.2-4/tests/test-lock.py # fake a fork forklock = copy.copy(lock) forklock._pidoffset = 1 forklock.release() state.assertreleasecalled(False) path: mercurial_7.2-4/tests/test-lock.py def makelock(self, *args, **kwargs): l = lockwrapper( self._pidoffset, self.vfs, testlockname,