summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorKa-Ping Yee <ping@zesty.ca>2001-03-23 05:14:10 (GMT)
committerKa-Ping Yee <ping@zesty.ca>2001-03-23 05:14:10 (GMT)
commitf170d7fea7021843e7831832f5f11ca428699149 (patch)
treec0667394e21b3526ea55695432fe4946558a9a85 /Lib/test/test_inspect.py
parent6526bf863eff2ef78465ba90d19a280d6657bddf (diff)
downloadcpython-f170d7fea7021843e7831832f5f11ca428699149.zip
cpython-f170d7fea7021843e7831832f5f11ca428699149.tar.gz
cpython-f170d7fea7021843e7831832f5f11ca428699149.tar.bz2
Don't have trace() skip the top frame; return them all.
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index fd4f12b..130fa8e 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -169,11 +169,14 @@ git.abuse(7, 8, 9)
istest(inspect.istraceback, 'git.ex[2]')
istest(inspect.isframe, 'mod.fr')
-test(len(git.tr) == 2, 'trace() length')
-test(git.tr[0][1:] == (TESTFN, 9, 'spam', [' eggs(b + d, c + f)\n'], 0),
- 'trace() row 1')
-test(git.tr[1][1:] == (TESTFN, 18, 'eggs', [' q = y / 0\n'], 0),
+test(len(git.tr) == 3, 'trace() length')
+test(git.tr[0][1:] == (TESTFN, 46, 'argue',
+ [' self.tr = inspect.trace()\n'], 0),
'trace() row 2')
+test(git.tr[1][1:] == (TESTFN, 9, 'spam', [' eggs(b + d, c + f)\n'], 0),
+ 'trace() row 2')
+test(git.tr[2][1:] == (TESTFN, 18, 'eggs', [' q = y / 0\n'], 0),
+ 'trace() row 3')
test(len(mod.st) >= 5, 'stack() length')
test(mod.st[0][1:] ==
@@ -188,7 +191,6 @@ test(mod.st[2][1:] ==
test(mod.st[3][1:] ==
(TESTFN, 39, 'abuse', [' self.argue(a, b, c)\n'], 0),
'stack() row 4')
-# row 4 is in test_inspect.py
args, varargs, varkw, locals = inspect.getargvalues(mod.fr)
test(args == ['x', 'y'], 'mod.fr args')