Patchwork [1,of,3] py3: byteify extension in test-debugcommands.t

login
register
mail settings
Submitter Matt Harbison
Date Sept. 29, 2018, 6:20 a.m.
Message ID <bf0bf1635b94a23f129a.1538202007@Envy>
Download mbox | patch
Permalink /patch/35201/
State Accepted
Headers show

Comments

Matt Harbison - Sept. 29, 2018, 6:20 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1538188758 14400
#      Fri Sep 28 22:39:18 2018 -0400
# Node ID bf0bf1635b94a23f129abc44eacbde830e541544
# Parent  cddac40b1a06c37cede9757914d930de92250612
py3: byteify extension in test-debugcommands.t
Pulkit Goyal - Sept. 30, 2018, 12:10 a.m.
On Sat, Sep 29, 2018 at 11:51 AM Matt Harbison <mharbison72@gmail.com>
wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1538188758 14400
> #      Fri Sep 28 22:39:18 2018 -0400
> # Node ID bf0bf1635b94a23f129abc44eacbde830e541544
> # Parent  cddac40b1a06c37cede9757914d930de92250612
> py3: byteify extension in test-debugcommands.t
>

Queued this series. Many many thanks for patches.

Patch

diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -532,29 +532,31 @@  Test internal debugstacktrace command
 
   $ cat > debugstacktrace.py << EOF
   > from __future__ import absolute_import
-  > import sys
-  > from mercurial import util
+  > from mercurial import (
+  >     pycompat,
+  >     util,
+  > )
   > def f():
-  >     util.debugstacktrace(f=sys.stdout)
+  >     util.debugstacktrace(f=pycompat.stdout)
   >     g()
   > def g():
-  >     util.dst('hello from g\\n', skip=1)
+  >     util.dst(b'hello from g\\n', skip=1)
   >     h()
   > def h():
-  >     util.dst('hi ...\\nfrom h hidden in g', 1, depth=2)
+  >     util.dst(b'hi ...\\nfrom h hidden in g', 1, depth=2)
   > f()
   > EOF
   $ "$PYTHON" debugstacktrace.py
   stacktrace at:
-   debugstacktrace.py:12 in * (glob)
-   debugstacktrace.py:5  in f
+   debugstacktrace.py:14 in * (glob)
+   debugstacktrace.py:7  in f
   hello from g at:
-   debugstacktrace.py:12 in * (glob)
-   debugstacktrace.py:6  in f
+   debugstacktrace.py:14 in * (glob)
+   debugstacktrace.py:8  in f
   hi ...
   from h hidden in g at:
-   debugstacktrace.py:6 in f
-   debugstacktrace.py:9 in g
+   debugstacktrace.py:8  in f
+   debugstacktrace.py:11 in g
 
 Test debugcapabilities command: