summaryrefslogtreecommitdiff
path: root/testing/cffi1/test_re_python.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2015-05-27 11:54:29 +0200
committerArmin Rigo <arigo@tunes.org>2015-05-27 11:54:29 +0200
commitd36df8a56beeca5aa9735f377b87f276144c0e9c (patch)
tree6b1e683d67ba53013847028809f640e2e8cfc8ba /testing/cffi1/test_re_python.py
parent393312c03a7adc8e83f26742667f3af17ed583c6 (diff)
downloadcffi-d36df8a56beeca5aa9735f377b87f276144c0e9c.tar.gz
Issue #197: this import fails for some people on CPython>=3.3 without
the magic lines. Can't reproduce it for me, though...
Diffstat (limited to 'testing/cffi1/test_re_python.py')
-rw-r--r--testing/cffi1/test_re_python.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/cffi1/test_re_python.py b/testing/cffi1/test_re_python.py
index 3f6ee6c..8f690b5 100644
--- a/testing/cffi1/test_re_python.py
+++ b/testing/cffi1/test_re_python.py
@@ -126,6 +126,10 @@ def test_include_1():
sub_ffi.set_source('re_python_pysrc', None)
sub_ffi.emit_python_code(str(tmpdir.join('_re_include_1.py')))
#
+ if sys.version_info[:2] >= (3, 3):
+ import importlib
+ importlib.invalidate_caches() # issue 197 (but can't reproduce myself)
+ #
from _re_include_1 import ffi
assert ffi.integer_const('FOOBAR') == -42
assert ffi.integer_const('FOOBAZ') == -43