From: Robert Bradshaw Date: Wed, 11 Aug 2010 19:53:25 +0000 (-0700) Subject: cpp_bool test (failing) X-Git-Tag: 0.13.beta1~6 X-Git-Url: http://git.tremily.us/?p=cython.git;a=commitdiff_plain;h=758080381b6148f70bca9c674c002e0d1312e4a5 cpp_bool test (failing) --- diff --git a/tests/bugs.txt b/tests/bugs.txt index 97283827..cb56af8b 100644 --- a/tests/bugs.txt +++ b/tests/bugs.txt @@ -16,6 +16,7 @@ with_statement_module_level_T536 function_as_method_T494 closure_inside_cdef_T554 ipow_crash_T562 +cpp_bool # CPython regression tests that don't current work: pyregr.test_threadsignals diff --git a/tests/run/cpp_bool.pyx b/tests/run/cpp_bool.pyx new file mode 100644 index 00000000..14a7b81e --- /dev/null +++ b/tests/run/cpp_bool.pyx @@ -0,0 +1,18 @@ +from libcpp cimport bool + +def test_bool(bool a): + """ + >>> test_bool(True) + True + >>> test_bool(1) + True + >>> test_bool(0) + False + >>> test_bool(100) + True + >>> test_bool(None) + False + >>> test_bool([]) + False + """ + return a