summaryrefslogtreecommitdiff
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-05-08 04:08:59 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2001-05-08 04:08:59 +0000
commit4c889011db22df761709ac8f9bc246bf4931e9c4 (patch)
treeda5261c42a69c290aa8aed898a4d86bea5ee0760 /Lib/test/test_scope.py
parentd37292bb8dcdba176e0898a7a7d114ddd415379d (diff)
downloadcpython-git-4c889011db22df761709ac8f9bc246bf4931e9c4.tar.gz
SF patch 419176 from MvL; fixed bug 418977
Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index c42d881402..fb5379067d 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -447,3 +447,23 @@ def f(x):
inst = f(3)()
verify(inst.a == inst.m())
+
+print "20. interaction with trace function"
+
+import sys
+def tracer(a,b,c):
+ return tracer
+
+def adaptgetter(name, klass, getter):
+ kind, des = getter
+ if kind == 1: # AV happens when stepping from this line to next
+ if des == "":
+ des = "_%s__%s" % (klass.__name__, name)
+ return lambda obj: getattr(obj, des)
+
+class TestClass:
+ pass
+
+sys.settrace(tracer)
+adaptgetter("foo", TestClass, (1, ""))
+sys.settrace(None)