[pypy-commit] cffi static-callback-embedding: Check that the module is present in sys.modules at this point,
arigo
pypy.commits at gmail.com
Wed Jan 6 15:50:22 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: static-callback-embedding
Changeset: r2530:15ecadc24cb7
Date: 2016-01-06 21:28 +0100
http://bitbucket.org/cffi/cffi/changeset/15ecadc24cb7/
Log: Check that the module is present in sys.modules at this point, and
that it is re-importable
diff --git a/testing/embedding/add2.py b/testing/embedding/add2.py
--- a/testing/embedding/add2.py
+++ b/testing/embedding/add2.py
@@ -10,6 +10,13 @@
import sys
sys.stdout.write("prepADD2\n")
+ assert '_add2_cffi' in sys.modules
+ m = sys.modules['_add2_cffi']
+ import _add2_cffi
+ assert m is _add2_cffi
+ assert _add2_cffi.ffi is ffi
+ assert _add2_cffi.lib is lib
+
@ffi.def_extern()
def add2(x, y, z):
sys.stdout.write("adding %d and %d and %d\n" % (x, y, z))
More information about the pypy-commit
mailing list