# HG changeset patch # User Martin von Zweigbergk # Date 2017-12-01 20:28:05 # Node ID 779c6cf2967b0808215bb8db72f191ca165dcf34 # Parent f12747de13ea635cbbb8245439ab805220cdab0e run-tests: avoid calculating _testdir again Differential Revision: https://phab.mercurial-scm.org/D1574 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -979,8 +979,7 @@ class Test(unittest.TestCase): ] r.append((self._escapepath(self._testtmp), b'$TESTTMP')) - testdir = os.path.dirname(self.path) - replacementfile = os.path.join(testdir, b'common-pattern.py') + replacementfile = os.path.join(self._testdir, b'common-pattern.py') if os.path.exists(replacementfile): data = {}