diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-05-08 04:08:59 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-05-08 04:08:59 (GMT) |
commit | 4c889011db22df761709ac8f9bc246bf4931e9c4 (patch) | |
tree | da5261c42a69c290aa8aed898a4d86bea5ee0760 /Lib/test/test_scope.py | |
parent | d37292bb8dcdba176e0898a7a7d114ddd415379d (diff) | |
download | cpython-4c889011db22df761709ac8f9bc246bf4931e9c4.zip cpython-4c889011db22df761709ac8f9bc246bf4931e9c4.tar.gz cpython-4c889011db22df761709ac8f9bc246bf4931e9c4.tar.bz2 |
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.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py index c42d881..fb53790 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) |