Mercurial > public > mercurial-scm > hg-stable
diff tests/test-debugcommands.t @ 45056:4c1b4805db57
pycompat: change users of pycompat.{stdin,stdout,stderr} to use procutil.std*
On Python 3, pycompat.{stdin,stdout,stderr} are usually block-buffered even if
connected to a TTY. procutil.{stdin,stdout,stderr} provide consistent behavior
across platforms and Python versions.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Mon, 06 Jul 2020 17:44:25 +0200 |
parents | a7b7a67b79c1 |
children | 7015b0232c5e |
line wrap: on
line diff
--- a/tests/test-debugcommands.t Mon Jul 06 10:30:55 2020 +0200 +++ b/tests/test-debugcommands.t Mon Jul 06 17:44:25 2020 +0200 @@ -573,11 +573,13 @@ $ cat > debugstacktrace.py << EOF > from __future__ import absolute_import > from mercurial import ( - > pycompat, > util, > ) + > from mercurial.utils import ( + > procutil, + > ) > def f(): - > util.debugstacktrace(f=pycompat.stdout) + > util.debugstacktrace(f=procutil.stdout) > g() > def g(): > util.dst(b'hello from g\\n', skip=1) @@ -588,15 +590,15 @@ > EOF $ "$PYTHON" debugstacktrace.py stacktrace at: - *debugstacktrace.py:14 in * (glob) - *debugstacktrace.py:7 in f (glob) + *debugstacktrace.py:16 in * (glob) + *debugstacktrace.py:9 in f (glob) hello from g at: - *debugstacktrace.py:14 in * (glob) - *debugstacktrace.py:8 in f (glob) + *debugstacktrace.py:16 in * (glob) + *debugstacktrace.py:10 in f (glob) hi ... from h hidden in g at: - *debugstacktrace.py:8 in f (glob) - *debugstacktrace.py:11 in g (glob) + *debugstacktrace.py:10 in f (glob) + *debugstacktrace.py:13 in g (glob) Test debugcapabilities command: