tests: add test for
issue5678
In addition to a test case for the direct problem described in the bug
report, this also adds a test case showing how obsmarkers can also get
lost when not using generaldelta.
Differential Revision: https://phab.mercurial-scm.org/D714
merge: move cwd-missing detection to helper functions
This will exist in two places with defered writes, so we want to avoid
duplication.
Differential Revision: https://phab.mercurial-scm.org/D626
doctest: enable tests by default on Python 3
Still several tests fail mostly because of the string issues, sigh. I'll
fix them one by one.
doctest: normalize b'', u'' and exception output on Python 3
The idea is described in the following page.
https://dirkjan.ochtman.nl/writing/2014/07/06/single-source-python-23-doctests.html
# no-check-commit
doctest: coerce dict.keys() to list
Otherwise it would be printed as odict_keys([...]) on Python 3.
doctest: do not embed non-ascii characters in docstring
Since the outer docstring is parsed as a unicode on Python 3, we have to
either double-escape or construct non-ascii string from ascii string.