From 5b7fac4a4b03705f86b693a7408050fed68c4522 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 21 Dec 2010 00:31:05 -0800 Subject: [PATCH] Regression tests for #632. --- tests/run/isinstance.pyx | 7 +++++++ 1 file changed, 7 insertions(+) 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') -- 2.26.2