Patchwork [01,of,10] tests: update test-debugcommands to pass our import checker

login
register
mail settings
Submitter Augie Fackler
Date Aug. 28, 2017, 2:41 p.m.
Message ID <74152a04c3bd15b1e01a.1503931314@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/23403/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 28, 2017, 2:41 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1503431435 14400
#      Tue Aug 22 15:50:35 2017 -0400
# Node ID 74152a04c3bd15b1e01a621df329b9a84e5bbca2
# Parent  794f7bb739be9f5e16ab26e2f2d98fbbf8be5659
tests: update test-debugcommands to pass our import checker
Yuya Nishihara - Aug. 28, 2017, 2:48 p.m.
On Mon, 28 Aug 2017 10:41:54 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1503431435 14400
> #      Tue Aug 22 15:50:35 2017 -0400
> # Node ID 74152a04c3bd15b1e01a621df329b9a84e5bbca2
> # Parent  794f7bb739be9f5e16ab26e2f2d98fbbf8be5659
> tests: update test-debugcommands to pass our import checker

Queued these, too. Many thanks.

Patch

diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -132,25 +132,27 @@  Test cache warming command
 Test internal debugstacktrace command
 
   $ cat > debugstacktrace.py << EOF
-  > from mercurial.util import debugstacktrace, dst, sys
+  > from __future__ import absolute_import
+  > import sys
+  > from mercurial import util
   > def f():
-  >     debugstacktrace(f=sys.stdout)
+  >     util.debugstacktrace(f=sys.stdout)
   >     g()
   > def g():
-  >     dst('hello from g\\n', skip=1)
+  >     util.dst('hello from g\\n', skip=1)
   >     h()
   > def h():
-  >     dst('hi ...\\nfrom h hidden in g', 1, depth=2)
+  >     util.dst('hi ...\\nfrom h hidden in g', 1, depth=2)
   > f()
   > EOF
   $ $PYTHON debugstacktrace.py
   stacktrace at:
-   debugstacktrace.py:10 in * (glob)
-   debugstacktrace.py:3  in f
+   debugstacktrace.py:12 in * (glob)
+   debugstacktrace.py:5  in f
   hello from g at:
-   debugstacktrace.py:10 in * (glob)
-   debugstacktrace.py:4  in f
+   debugstacktrace.py:12 in * (glob)
+   debugstacktrace.py:6  in f
   hi ...
   from h hidden in g at:
-   debugstacktrace.py:4 in f
-   debugstacktrace.py:7 in g
+   debugstacktrace.py:6 in f
+   debugstacktrace.py:9 in g