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
0d4db187
Commit
0d4db187
authored
Aug 06, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend argument unpacking test with some new CPython tests
parent
d13bbd02
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
tests/run/pep448_test_extcall.pyx
tests/run/pep448_test_extcall.pyx
+6
-0
No files found.
tests/run/pep448_test_extcall.pyx
View file @
0d4db187
...
@@ -80,6 +80,7 @@ def call_f_positional():
...
@@ -80,6 +80,7 @@ def call_f_positional():
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2, 3, 4, 5, 6, 7) {}
(1, 2) {}
"""
"""
f
()
f
()
f
(
1
)
f
(
1
)
...
@@ -92,6 +93,7 @@ def call_f_positional():
...
@@ -92,6 +93,7 @@ def call_f_positional():
f
(
1
,
2
,
3
,
*
[
4
,
5
],
*
[
6
,
7
])
f
(
1
,
2
,
3
,
*
[
4
,
5
],
*
[
6
,
7
])
f
(
1
,
*
[
2
,
3
],
4
,
*
[
5
,
6
],
7
)
f
(
1
,
*
[
2
,
3
],
4
,
*
[
5
,
6
],
7
)
f
(
*
UserList
([
1
,
2
]),
*
UserList
([
3
,
4
]),
5
,
*
UserList
([
6
,
7
]))
f
(
*
UserList
([
1
,
2
]),
*
UserList
([
3
,
4
]),
5
,
*
UserList
([
6
,
7
]))
f
(
1
,
*
[]
or
()
and
{},
*
()
and
[],
*
{}
or
[]
and
(),
*
{}
and
[]
or
(),
2
)
# Here we add keyword arguments
# Here we add keyword arguments
...
@@ -108,6 +110,7 @@ def call_f_kwargs():
...
@@ -108,6 +110,7 @@ def call_f_kwargs():
(1, 2, 3, 4, 5) {'a': 6, 'b': 7}
(1, 2, 3, 4, 5) {'a': 6, 'b': 7}
(1, 2, 3, 6, 7) {'a': 8, 'b': 9, 'x': 4, 'y': 5}
(1, 2, 3, 6, 7) {'a': 8, 'b': 9, 'x': 4, 'y': 5}
(1, 2, 3, 4, 5) {'a': 8, 'b': 9, 'x': 6, 'y': 7}
(1, 2, 3, 4, 5) {'a': 8, 'b': 9, 'x': 6, 'y': 7}
(1, 2) {'a': 3}
"""
"""
f
(
1
,
2
,
3
,
**
{
'a'
:
4
,
'b'
:
5
})
f
(
1
,
2
,
3
,
**
{
'a'
:
4
,
'b'
:
5
})
...
@@ -121,6 +124,9 @@ def call_f_kwargs():
...
@@ -121,6 +124,9 @@ def call_f_kwargs():
f
(
1
,
2
,
3
,
x
=
4
,
y
=
5
,
*
(
6
,
7
),
**
UserDict
(
a
=
8
,
b
=
9
))
f
(
1
,
2
,
3
,
x
=
4
,
y
=
5
,
*
(
6
,
7
),
**
UserDict
(
a
=
8
,
b
=
9
))
f
(
1
,
2
,
3
,
*
(
4
,
5
),
x
=
6
,
y
=
7
,
**
UserDict
(
a
=
8
,
b
=
9
))
f
(
1
,
2
,
3
,
*
(
4
,
5
),
x
=
6
,
y
=
7
,
**
UserDict
(
a
=
8
,
b
=
9
))
f
(
1
,
*
[]
or
()
and
{},
*
()
and
[],
*
{}
or
[]
and
(),
*
{}
and
[]
or
(),
2
,
**
{}
and
{}
or
{},
**
{}
or
{}
and
{},
**
{}
and
{},
a
=
3
)
# Examples with invalid arguments (TypeErrors). We're also testing the function
# Examples with invalid arguments (TypeErrors). We're also testing the function
# names in the exception messages.
# names in the exception messages.
...
...
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