summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_trace.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 (GMT)
commit221085de89afa861c49ff4306979dbbad949d393 (patch)
tree3e79f6c14311cba733d5f8d1a1e2c227d238fd51 /Lib/test/test_trace.py
parent27d517b21b67b54637acd19785f7adfc38fbd8c2 (diff)
downloadcpython-221085de89afa861c49ff4306979dbbad949d393.zip
cpython-221085de89afa861c49ff4306979dbbad949d393.tar.gz
cpython-221085de89afa861c49ff4306979dbbad949d393.tar.bz2
Change all the function attributes from func_* -> __*__. This gets rid
of func_name, func_dict and func_doc as they already exist as __name__, __dict__ and __doc__.
Diffstat (limited to 'Lib/test/test_trace.py')
-rw-r--r--Lib/test/test_trace.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 7b5ac7d..b1778dd 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -226,14 +226,14 @@ class TraceTestCase(unittest.TestCase):
sys.settrace(tracer.trace)
func()
sys.settrace(None)
- self.compare_events(func.func_code.co_firstlineno,
+ self.compare_events(func.__code__.co_firstlineno,
tracer.events, func.events)
def run_test2(self, func):
tracer = Tracer()
func(tracer.trace)
sys.settrace(None)
- self.compare_events(func.func_code.co_firstlineno,
+ self.compare_events(func.__code__.co_firstlineno,
tracer.events, func.events)
def test_01_basic(self):
@@ -313,7 +313,7 @@ class RaisingTraceFuncTestCase(unittest.TestCase):
def g(frame, why, extra):
if (why == 'line' and
- frame.f_lineno == f.func_code.co_firstlineno + 2):
+ frame.f_lineno == f.__code__.co_firstlineno + 2):
raise RuntimeError, "i am crashing"
return g
@@ -344,7 +344,7 @@ class JumpTracer:
self.done = False
def trace(self, frame, event, arg):
- if not self.done and frame.f_code == self.function.func_code:
+ if not self.done and frame.f_code == self.function.__code__:
firstLine = frame.f_code.co_firstlineno
if frame.f_lineno == firstLine + self.jumpFrom:
# Cope with non-integer self.jumpTo (because of