changeset 35194:779c6cf2967b

run-tests: avoid calculating _testdir again Differential Revision: https://phab.mercurial-scm.org/D1574
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 01 Dec 2017 12:28:05 -0800
parents f12747de13ea
children 900ed9853017
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Dec 01 12:27:28 2017 -0800
+++ b/tests/run-tests.py	Fri Dec 01 12:28:05 2017 -0800
@@ -979,8 +979,7 @@
             ]
         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 = {}