Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5b7fac4a
Commit
5b7fac4a
authored
Dec 21, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Regression tests for #632.
parent
ce66d553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
tests/run/isinstance.pyx
tests/run/isinstance.pyx
+7
-0
No files found.
tests/run/isinstance.pyx
View file @
5b7fac4a
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment