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
7db195ac
Commit
7db195ac
authored
Aug 21, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 test fixes
parent
ad56990c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
tests/run/importfrom.pyx
tests/run/importfrom.pyx
+6
-5
tests/run/index.pyx
tests/run/index.pyx
+4
-0
tests/run/typedfieldbug_T303.pyx
tests/run/typedfieldbug_T303.pyx
+6
-2
No files found.
tests/run/importfrom.pyx
View file @
7db195ac
...
...
@@ -12,7 +12,7 @@ True
True
True
an integer is required
Expected t
upl
e, got int
Expected t
yp
e, got int
"""
def
import1
():
...
...
@@ -48,14 +48,15 @@ def import4():
def
typed_imports
():
import
sys
import
types
cdef
long
maxunicode
cdef
t
upl
e
t
cdef
t
yp
e
t
from
sys
import
maxunicode
print
maxunicode
==
sys
.
maxunicode
from
sys
import
version_info
as
t
print
t
is
sys
.
version_info
from
types
import
ModuleType
as
t
print
t
is
types
.
ModuleType
try
:
from
sys
import
version_info
as
maxunicode
except
TypeError
,
e
:
...
...
tests/run/index.pyx
View file @
7db195ac
...
...
@@ -48,6 +48,10 @@ TypeError: 'int' object is unsubscriptable
>>> test_long_long()
"""
import
sys
if
sys
.
version_info
[
0
]
>=
3
:
__doc__
=
__doc__
.
replace
(
u'is unsubscriptable'
,
u'is not subscriptable'
)
def
index_tuple
(
tuple
t
,
int
i
):
return
t
[
i
]
...
...
tests/run/typedfieldbug_T303.pyx
View file @
7db195ac
"""
__doc__
=
u
"""
>>> f()
42.0
42.0
...
...
@@ -12,9 +12,13 @@ TypeError: readonly attribute
Traceback (most recent call last):
...
SystemError: bad memberdescr type
"""
import
sys
if
sys
.
version_info
[
0
]
>=
3
:
__doc__
=
__doc__
.
replace
(
u'TypeError:'
,
u'AttributeError:'
)
cdef
extern
from
"external_defs.h"
:
ctypedef
float
DoubleTypedef
ctypedef
float
LongDoubleTypedef
...
...
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