Patchwork D1574: run-tests: avoid calculating _testdir again

login
register
mail settings
Submitter phabricator
Date Dec. 1, 2017, 10:18 p.m.
Message ID <differential-rev-PHID-DREV-7ijopmpmbeyle7js6dw6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25872/
State Superseded
Headers show

Comments

phabricator - Dec. 1, 2017, 10:18 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1574

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -968,8 +968,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 = {}