Patchwork D1574: run-tests: avoid calculating _testdir again

login
register
mail settings
Submitter phabricator
Date Dec. 2, 2017, 3:11 a.m.
Message ID <ba5b8bfe9cc0000c4a6cb3f9c3b3c9fa@localhost.localdomain>
Download mbox | patch
Permalink /patch/25885/
State Not Applicable
Headers show

Comments

phabricator - Dec. 2, 2017, 3:11 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG779c6cf2967b: run-tests: avoid calculating _testdir again (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1574?vs=4064&id=4077

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, yuja
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
@@ -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 = {}