summaryrefslogtreecommitdiff
path: root/tests/run/numpy_cimport_2.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/numpy_cimport_2.pyx')
-rw-r--r--tests/run/numpy_cimport_2.pyx25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/run/numpy_cimport_2.pyx b/tests/run/numpy_cimport_2.pyx
new file mode 100644
index 000000000..cdf8783c9
--- /dev/null
+++ b/tests/run/numpy_cimport_2.pyx
@@ -0,0 +1,25 @@
+# mode: run
+# tag: warnings, numpy
+
+cimport numpy as np
+np.import_array()
+# np.import_array is called - no warning necessary
+
+cdef extern from *:
+ """
+ static void** _check_array_api(void) {
+ return PyArray_API; /* should be non NULL */
+ }
+ """
+ void** _check_array_api()
+
+def check_array_api():
+ """
+ >>> check_array_api()
+ True
+ """
+ return _check_array_api() != NULL
+
+
+_WARNINGS = """
+"""