D7707: tests-pure: fixing test-parseindex2

gracinet (Georges Racinet) phabricator at mercurial-scm.org
Fri Dec 20 16:13:04 EST 2019


Closed by commit rHGac627ed8a911: tests-pure: fixing test-parseindex2 (authored by gracinet).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7707?vs=18899&id=18900

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7707/new/

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

AFFECTED FILES
  tests/test-parseindex2.py

CHANGE DETAILS

diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -267,11 +267,13 @@
         appendrev(6)
         self.assertEqual(len(index), 7)
 
-        del index[1:7]
+        del index[1:-1]
 
         # assertions that failed before correction
         self.assertEqual(len(index), 1)  # was 4
-        self.assertEqual(index.headrevs(), [0])  # gave ValueError
+        headrevs = getattr(index, 'headrevs', None)
+        if headrevs is not None:  # not implemented in pure
+            self.assertEqual(index.headrevs(), [0])  # gave ValueError
 
 
 if __name__ == '__main__':



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


More information about the Mercurial-devel mailing list