D2638: tests: fix indentation width in run-tests

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sun Mar 4 15:26:06 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Caught by check-code.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2318,13 +2318,13 @@
 
     if previoustimes:
         def sortkey(f):
-          f = f['path']
-          if f in previoustimes:
-            # Use most recent time as estimate
-            return -previoustimes[f][-1]
-          else:
-            # Default to a rather arbitrary value of 1 second for new tests
-            return -1.0
+            f = f['path']
+            if f in previoustimes:
+                # Use most recent time as estimate
+                return -previoustimes[f][-1]
+            else:
+                # Default to a rather arbitrary value of 1 second for new tests
+                return -1.0
     else:
         # keywords for slow tests
         slow = {b'svn': 10,
@@ -2447,7 +2447,7 @@
                 self._outputdir = os.path.join(self._outputdir, pathname)
         previoustimes = {}
         if self.options.order_by_runtime:
-          previoustimes = dict(loadtimes(self._outputdir))
+            previoustimes = dict(loadtimes(self._outputdir))
         sorttests(testdescs, previoustimes, shuffle=self.options.random)
 
         if 'PYTHONHASHSEED' not in os.environ:



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


More information about the Mercurial-devel mailing list