D3877: tests: don't reimplement enumerate() in run-tests
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Jul 3 23:43:06 UTC 2018
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/D3877
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
@@ -1480,10 +1480,8 @@
if expected.get(pos, None):
els = expected[pos]
- i = 0
optional = []
- while i < len(els):
- el = els[i]
+ for i, el in enumerate(els):
r = self.linematch(el, lout)
if isinstance(r, str):
@@ -1512,8 +1510,6 @@
if not self._iftest(conditions):
optional.append(i)
- i += 1
-
if r:
if r == "retry":
continue
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list