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
6511e905
Commit
6511e905
authored
May 13, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up test
parent
f7951939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
tests/run/non_dict_kwargs_T470.pyx
tests/run/non_dict_kwargs_T470.pyx
+25
-24
No files found.
tests/run/non_dict_kwargs_T470.pyx
View file @
6511e905
# mode: run
# ticket: 470
__doc__
=
u"""
>>> func(**{'a' : 7})
True
>>> func(**SubDict())
True
>>> call_non_dict_test()
True
>>> call_non_dict_test_kw()
True
>>> call_sub_dict_test()
True
>>> call_sub_dict_test_kw()
True
"""
import
sys
if
sys
.
version_info
>=
(
2
,
6
):
__doc__
+=
u"""
>>> func(**NonDict())
True
"""
def
func
(
**
kwargs
):
"""
>>> func(**{'a' : 7})
True
>>> func(**SubDict())
True
>>> func(**NonDict())
True
"""
return
type
(
kwargs
)
is
dict
and
kwargs
[
'a'
]
==
7
...
...
@@ -37,9 +22,17 @@ class NonDict(object):
return
[
'a'
]
def
call_non_dict_test
():
"""
>>> call_non_dict_test()
True
"""
return
func
(
**
NonDict
())
def
call_non_dict_test_kw
():
"""
>>> call_non_dict_test_kw()
True
"""
return
func
(
b
=
5
,
**
NonDict
())
...
...
@@ -48,7 +41,15 @@ class SubDict(dict):
self
[
'a'
]
=
7
def
call_sub_dict_test
():
"""
>>> call_sub_dict_test()
True
"""
return
func
(
**
SubDict
())
def
call_sub_dict_test_kw
():
"""
>>> call_sub_dict_test_kw()
True
"""
return
func
(
b
=
5
,
**
SubDict
())
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