[PATCH 4 of 7] tests: replace imported module to avoid check-code.py error

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sun Feb 17 12:19:27 EST 2019


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1550417245 -32400
#      Mon Feb 18 00:27:25 2019 +0900
# Node ID c1c8ae482985411a899cced234c2ef07d508c356
# Parent  d294202804a296c3f03e1c013886c5c1f174be6c
# Available At https://bitbucket.org/foozy/mercurial-wip
#              hg pull https://bitbucket.org/foozy/mercurial-wip -r c1c8ae482985
# EXP-Topic tests-fix-check-code-errors
tests: replace imported module to avoid check-code.py error

This is a part of preparation to apply checking with check-code.py on
code fragments embedded in *.t test scripts.

diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -290,7 +290,7 @@ hg status -A:
 
   $ hg status -A -Tpickle > pickle
   >>> from __future__ import print_function
-  >>> import pickle
+  >>> from mercurial.util import pickle
   >>> 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


More information about the Mercurial-devel mailing list