summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2018-11-27 21:49:43 +0200
committerArmin Rigo <arigo@tunes.org>2018-11-27 21:49:43 +0200
commit78f8426900f32f5392fb783a907cd5d56325e768 (patch)
treea467d9fb5ab07c1a449ac35d1c735b8a92bfb286 /testing
parent9178ac12a645f71749b273cc630d41b98001ad6a (diff)
downloadcffi-78f8426900f32f5392fb783a907cd5d56325e768.tar.gz
Silence bogus warning
Diffstat (limited to 'testing')
-rw-r--r--testing/cffi1/test_recompiler.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
index ea120bf..87867c6 100644
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -1538,15 +1538,18 @@ def test_win32_calling_convention_3():
assert (pt.x, pt.y) == (99*500*999, -99*500*999)
def test_extern_python_1():
+ import warnings
ffi = FFI()
- ffi.cdef("""
+ with warnings.catch_warnings(record=True) as log:
+ ffi.cdef("""
extern "Python" {
int bar(int, int);
void baz(int, int);
int bok(void);
void boz(void);
}
- """)
+ """)
+ assert len(log) == 0, "got a warning: %r" % (log,)
lib = verify(ffi, 'test_extern_python_1', """
static void baz(int, int); /* forward */
""")