Author: Antonio Cuni <[email protected]>
Branch:
Changeset: r44123:19c2f118730a
Date: 2011-05-13 14:47 +0200
http://bitbucket.org/pypy/pypy/changeset/19c2f118730a/
Log: write a test for 86db0a1b82c4 (Py_AtExit)
diff --git a/pypy/module/cpyext/test/test_eval.py
b/pypy/module/cpyext/test/test_eval.py
--- a/pypy/module/cpyext/test/test_eval.py
+++ b/pypy/module/cpyext/test/test_eval.py
@@ -166,6 +166,15 @@
lltype.free(pi, flavor='raw')
+ def test_atexit(self, space, api):
+ lst = []
+ def func():
+ lst.append(42)
+ api.Py_AtExit(func)
+ cpyext = space.getbuiltinmodule('cpyext')
+ cpyext.shutdown(space) # simulate shutdown
+ assert lst == [42]
+
class AppTestCall(AppTestCpythonExtensionBase):
def test_CallFunction(self):
module = self.import_extension('foo', [
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit