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
7354f508
Commit
7354f508
authored
Jul 30, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testcase for #564, refcount bug in isinstance optimization
parent
5b4469d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
tests/run/isinstance.pyx
tests/run/isinstance.pyx
+14
-0
No files found.
tests/run/isinstance.pyx
View file @
7354f508
...
@@ -73,3 +73,17 @@ def test_custom():
...
@@ -73,3 +73,17 @@ def test_custom():
"""
"""
assert
isinstance
(
A
(),
A
)
assert
isinstance
(
A
(),
A
)
return
True
return
True
def
test_nested
(
x
):
"""
>>> test_nested(1)
True
>>> test_nested(1.5)
True
>>> test_nested("a")
False
"""
cdef
object
a
=
(
x
,
None
)
if
isinstance
(
a
[
0
],
(
int
,
float
)):
return
True
return
False
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