Author: Armin Rigo <[email protected]>
Branch:
Changeset: r44041:0f83d454b5f7
Date: 2011-05-09 14:02 +0200
http://bitbucket.org/pypy/pypy/changeset/0f83d454b5f7/
Log: A test, reporting a problem from jandecaluwe.
diff --git a/pypy/interpreter/test/test_executioncontext.py
b/pypy/interpreter/test/test_executioncontext.py
--- a/pypy/interpreter/test/test_executioncontext.py
+++ b/pypy/interpreter/test/test_executioncontext.py
@@ -324,3 +324,22 @@
g.close()
assert 'Called 1' in data
assert 'Called 2' in data
+
+
+class AppTestProfile:
+
+ def test_return(self):
+ import sys
+ l = []
+ def profile(frame, event, arg):
+ l.append((event, arg))
+
+ def bar(x):
+ return 40 + x
+
+ sys.setprofile(profile)
+ bar(2)
+ sys.setprofile(None)
+ assert l == [('call', None),
+ ('return', 42),
+ ('c_call', sys.setprofile)], repr(l)
_______________________________________________
Pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit