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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
dea87f8a
Commit
dea87f8a
authored
Feb 25, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for typed from...import
parent
c80818f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
tests/run/importfrom.pyx
tests/run/importfrom.pyx
+29
-0
No files found.
tests/run/importfrom.pyx
View file @
dea87f8a
...
@@ -8,6 +8,11 @@ True
...
@@ -8,6 +8,11 @@ True
True
True
>>> import4() == (cmd, core, version)
>>> import4() == (cmd, core, version)
True
True
>>> typed_imports()
True
True
an integer is required
Expected tuple, got int
"""
"""
def
import1
():
def
import1
():
...
@@ -37,3 +42,27 @@ def import3():
...
@@ -37,3 +42,27 @@ def import3():
def
import4
():
def
import4
():
from
distutils
import
cmd
,
core
,
version
from
distutils
import
cmd
,
core
,
version
return
cmd
,
core
,
version
return
cmd
,
core
,
version
def
typed_imports
():
import
sys
cdef
long
maxint
cdef
tuple
t
from
sys
import
maxint
print
maxint
==
sys
.
maxint
from
sys
import
version_info
as
t
print
t
is
sys
.
version_info
try
:
from
sys
import
version_info
as
maxint
except
TypeError
,
e
:
print
e
try
:
from
sys
import
maxint
as
t
except
TypeError
,
e
:
print
e
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