From: Robert Bradshaw Date: Tue, 21 Dec 2010 08:31:05 +0000 (-0800) Subject: Regression tests for #632. X-Git-Tag: 0.14.1rc0~13^2~10 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5b7fac4a4b03705f86b693a7408050fed68c4522;p=cython.git Regression tests for #632. --- diff --git a/tests/run/isinstance.pyx b/tests/run/isinstance.pyx index 858f9ab2..db54a9de 100644 --- a/tests/run/isinstance.pyx +++ b/tests/run/isinstance.pyx @@ -5,6 +5,8 @@ from cpython.bool cimport bool cdef class A: pass +cdef an_A = A() + @cython.test_assert_path_exists('//SimpleCallNode//SimpleCallNode') @cython.test_fail_if_path_exists('//SimpleCallNode//PythonCapiCallNode', '//PythonCapiCallNode//SimpleCallNode') @@ -48,6 +50,11 @@ def test_optimised(): assert isinstance(complex(), complex) assert not isinstance(u"foo", int) assert isinstance(A, type) + assert isinstance(an_A, A) + cdef type typed_type = A + assert isinstance(an_A, typed_type) + cdef object untyped_type = A + assert isinstance(an_A, untyped_type) return True @cython.test_assert_path_exists('//PythonCapiCallNode')