[Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.14.2.1,1.14.2.2
Thomas Wouters
twouters@users.sourceforge.net
Wed, 23 May 2001 06:26:31 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv6540/Lib/test
Modified Files:
Tag: release21-maint
test_scope.py
Log Message:
Backport Jeremy's checkins (frameobject.c:2.50, test_scope.py:1.16,
test_scope:1.8):
SF patch 419176 from MvL; fixed bug 418977
Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
Index: test_scope.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -C2 -r1.14.2.1 -r1.14.2.2
*** test_scope.py 2001/05/23 12:15:17 1.14.2.1
--- test_scope.py 2001/05/23 13:26:29 1.14.2.2
***************
*** 448,449 ****
--- 448,469 ----
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)