Mercurial > hg
comparison tests/test-debugcommands.t @ 33953:90981271a904
tests: update test-debugcommands to pass our import checker
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Tue, 22 Aug 2017 15:50:35 -0400 |
parents | e21b750c9b9e |
children | 7ee2d859f720 |
comparison
equal
deleted
inserted
replaced
33952:794f7bb739be | 33953:90981271a904 |
---|---|
130 $ cd .. | 130 $ cd .. |
131 | 131 |
132 Test internal debugstacktrace command | 132 Test internal debugstacktrace command |
133 | 133 |
134 $ cat > debugstacktrace.py << EOF | 134 $ cat > debugstacktrace.py << EOF |
135 > from mercurial.util import debugstacktrace, dst, sys | 135 > from __future__ import absolute_import |
136 > import sys | |
137 > from mercurial import util | |
136 > def f(): | 138 > def f(): |
137 > debugstacktrace(f=sys.stdout) | 139 > util.debugstacktrace(f=sys.stdout) |
138 > g() | 140 > g() |
139 > def g(): | 141 > def g(): |
140 > dst('hello from g\\n', skip=1) | 142 > util.dst('hello from g\\n', skip=1) |
141 > h() | 143 > h() |
142 > def h(): | 144 > def h(): |
143 > dst('hi ...\\nfrom h hidden in g', 1, depth=2) | 145 > util.dst('hi ...\\nfrom h hidden in g', 1, depth=2) |
144 > f() | 146 > f() |
145 > EOF | 147 > EOF |
146 $ $PYTHON debugstacktrace.py | 148 $ $PYTHON debugstacktrace.py |
147 stacktrace at: | 149 stacktrace at: |
148 debugstacktrace.py:10 in * (glob) | 150 debugstacktrace.py:12 in * (glob) |
149 debugstacktrace.py:3 in f | 151 debugstacktrace.py:5 in f |
150 hello from g at: | 152 hello from g at: |
151 debugstacktrace.py:10 in * (glob) | 153 debugstacktrace.py:12 in * (glob) |
152 debugstacktrace.py:4 in f | 154 debugstacktrace.py:6 in f |
153 hi ... | 155 hi ... |
154 from h hidden in g at: | 156 from h hidden in g at: |
155 debugstacktrace.py:4 in f | 157 debugstacktrace.py:6 in f |
156 debugstacktrace.py:7 in g | 158 debugstacktrace.py:9 in g |