Mercurial > hg
changeset 39475:431068d7e9db
ancestor: add test showing inconsistency between __iter__ and __contains__
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 08 Sep 2018 10:48:42 +0900 |
parents | a60dae060bc8 |
children | 7eadc9407867 |
files | tests/test-ancestor.py tests/test-ancestor.py.out |
diffstat | 2 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-ancestor.py Thu Sep 06 19:37:38 2018 -0400 +++ b/tests/test-ancestor.py Sat Sep 08 10:48:42 2018 +0900 @@ -215,6 +215,11 @@ s = genlazyancestors([11, 13], stoprev=6, inclusive=True) printlazyancestors(s, [11, 13, 7, 9, 8, 3, 6, 4, 1, -1, 0]) + # Test with stoprev >= min(initrevs) + s = genlazyancestors([11, 13], stoprev=11, inclusive=True) + printlazyancestors(s, [11, 13, 7, 9, 8, 3, 6, 4, 1, -1, 0]) + s = genlazyancestors([11, 13], stoprev=12, inclusive=True) + printlazyancestors(s, [11, 13, 7, 9, 8, 3, 6, 4, 1, -1, 0]) # The C gca algorithm requires a real repo. These are textual descriptions of # DAGs that have been known to be problematic, and, optionally, known pairs
--- a/tests/test-ancestor.py.out Thu Sep 06 19:37:38 2018 -0400 +++ b/tests/test-ancestor.py.out Sat Sep 08 10:48:42 2018 +0900 @@ -16,3 +16,9 @@ % lazy ancestor set for [11, 13], stoprev = 6, inclusive = True membership: [11, 13, 7, 8] iteration: [13, 11, 8, 7] +% lazy ancestor set for [11, 13], stoprev = 11, inclusive = True +membership: [11, 13] +iteration: [13, 11] +% lazy ancestor set for [11, 13], stoprev = 12, inclusive = True +membership: [11, 13] +iteration: [13]