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
0f6a6779
Commit
0f6a6779
authored
Jul 21, 2017
by
Robert Bradshaw
Committed by
GitHub
Jul 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1792 from ChristopherHogan/chogan/skip_win32
skip_win32 doesn't properly skip tests
parents
ae27370c
00b92d79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Cython/Build/Tests/TestIpythonMagic.py
Cython/Build/Tests/TestIpythonMagic.py
+12
-6
No files found.
Cython/Build/Tests/TestIpythonMagic.py
View file @
0f6a6779
...
@@ -42,11 +42,17 @@ if sys.platform == 'win32':
...
@@ -42,11 +42,17 @@ if sys.platform == 'win32':
from
unittest
import
skip
as
skip_win32
from
unittest
import
skip
as
skip_win32
except
ImportError
:
except
ImportError
:
# poor dev's silent @unittest.skip()
# poor dev's silent @unittest.skip()
def
skip_win32
(
f
):
def
skip_win32
(
dummy
):
return
lambda
self
:
None
def
_skip_win32
(
func
):
return
None
return
_skip_win32
else
:
else
:
def
skip_win32
(
f
):
def
skip_win32
(
dummy
):
return
f
def
_skip_win32
(
func
):
def
wrapper
(
*
args
,
**
kwargs
):
func
(
*
args
,
**
kwargs
)
return
wrapper
return
_skip_win32
class
TestIPythonMagic
(
CythonTest
):
class
TestIPythonMagic
(
CythonTest
):
...
@@ -60,7 +66,7 @@ class TestIPythonMagic(CythonTest):
...
@@ -60,7 +66,7 @@ class TestIPythonMagic(CythonTest):
result
=
ip
.
run_cell_magic
(
'cython_inline'
,
''
,
'return a+b'
)
result
=
ip
.
run_cell_magic
(
'cython_inline'
,
''
,
'return a+b'
)
self
.
assertEqual
(
result
,
30
)
self
.
assertEqual
(
result
,
30
)
@
skip_win32
@
skip_win32
(
'Skip on Windows'
)
def
test_cython_pyximport
(
self
):
def
test_cython_pyximport
(
self
):
module_name
=
'_test_cython_pyximport'
module_name
=
'_test_cython_pyximport'
ip
.
run_cell_magic
(
'cython_pyximport'
,
module_name
,
code
)
ip
.
run_cell_magic
(
'cython_pyximport'
,
module_name
,
code
)
...
@@ -111,7 +117,7 @@ class TestIPythonMagic(CythonTest):
...
@@ -111,7 +117,7 @@ class TestIPythonMagic(CythonTest):
self
.
assertEqual
(
ip
.
user_ns
[
'g'
],
2
//
10
)
self
.
assertEqual
(
ip
.
user_ns
[
'g'
],
2
//
10
)
self
.
assertEqual
(
ip
.
user_ns
[
'h'
],
2
//
10
)
self
.
assertEqual
(
ip
.
user_ns
[
'h'
],
2
//
10
)
@
skip_win32
@
skip_win32
(
'Skip on Windows'
)
def
test_extlibs
(
self
):
def
test_extlibs
(
self
):
code
=
py3compat
.
str_to_unicode
(
"""
code
=
py3compat
.
str_to_unicode
(
"""
from libc.math cimport sin
from libc.math cimport sin
...
...
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