D5089: py3: fix test-status.t
mbthomas (Mark Thomas)
phabricator at mercurial-scm.org
Sat Oct 13 15:32:15 UTC 2018
mbthomas created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D5089
AFFECTED FILES
tests/test-status.t
CHANGE DETAILS
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -272,8 +272,17 @@
$ hg status -A -Tpickle > pickle
>>> from __future__ import print_function
>>> import pickle
- >>> print(sorted((x['status'], x['path']) for x in pickle.load(open("pickle"))))
- [('!', 'deleted'), ('?', 'pickle'), ('?', 'unknown'), ('A', 'added'), ('A', 'copied'), ('C', '.hgignore'), ('C', 'modified'), ('I', 'ignored'), ('R', 'removed')]
+ >>> data = sorted((x[b'status'].decode(), x[b'path'].decode()) for x in pickle.load(open("pickle", r"rb")))
+ >>> for s, p in data: print("%s %s" % (s, p))
+ ! deleted
+ ? pickle
+ ? unknown
+ A added
+ A copied
+ C .hgignore
+ C modified
+ I ignored
+ R removed
$ rm pickle
$ echo "^ignoreddir$" > .hgignore
@@ -528,7 +537,7 @@
$ hg status --config ui.formatdebug=True --rev 1 1
status = [
- {*'path': '1/2/3/4/5/b.txt'*}, (glob)
+ {*'path': *'1/2/3/4/5/b.txt'*}, (glob)
]
#if windows
To: mbthomas, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list