[Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.15,1.16

Jeremy Hylton jhylton@users.sourceforge.net
Mon, 07 May 2001 21:08:18 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv22026

Modified Files:
	test_scope.py 
Log Message:
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.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** test_scope.py	2001/04/27 02:29:18	1.15
--- test_scope.py	2001/05/08 04:08:16	1.16
***************
*** 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)