Skip to content
Snippets Groups Projects
Commit ac627ed8 authored by Georges Racinet's avatar Georges Racinet
Browse files

tests-pure: fixing test-parseindex2

This is a followup to D7603 (49fa0b31ee1d) which broke
the tests for pure Python implementation. There are two
divergences between pure and C implementations:

- the pure implementation would accept only -1 as slice end,
  whereas C accepts both -1 and len(index)
- in pure Python, `headrevs` is provided by revlog.py, not
  by the index.

Differential Revision: https://phab.mercurial-scm.org/D7707
parent f98f0e3d
No related branches found
No related tags found
No related merge requests found
......@@ -267,7 +267,7 @@
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
......@@ -271,7 +271,9 @@
# 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__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment