Commit 5b7fac4a authored by Robert Bradshaw's avatar Robert Bradshaw

Regression tests for #632.

parent ce66d553
...@@ -5,6 +5,8 @@ from cpython.bool cimport bool ...@@ -5,6 +5,8 @@ from cpython.bool cimport bool
cdef class A: cdef class A:
pass pass
cdef an_A = A()
@cython.test_assert_path_exists('//SimpleCallNode//SimpleCallNode') @cython.test_assert_path_exists('//SimpleCallNode//SimpleCallNode')
@cython.test_fail_if_path_exists('//SimpleCallNode//PythonCapiCallNode', @cython.test_fail_if_path_exists('//SimpleCallNode//PythonCapiCallNode',
'//PythonCapiCallNode//SimpleCallNode') '//PythonCapiCallNode//SimpleCallNode')
...@@ -48,6 +50,11 @@ def test_optimised(): ...@@ -48,6 +50,11 @@ def test_optimised():
assert isinstance(complex(), complex) assert isinstance(complex(), complex)
assert not isinstance(u"foo", int) assert not isinstance(u"foo", int)
assert isinstance(A, type) 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, <type>untyped_type)
return True return True
@cython.test_assert_path_exists('//PythonCapiCallNode') @cython.test_assert_path_exists('//PythonCapiCallNode')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment