Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ceccc3c0
Commit
ceccc3c0
authored
Apr 11, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test cases for examples of ext call error handling.
Fix to SF bug #414743 based on Michael Hudson's patch #414750.
parent
512a2377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
Lib/test/output/test_extcall
Lib/test/output/test_extcall
+5
-0
Lib/test/test_extcall.py
Lib/test/test_extcall.py
+35
-0
No files found.
Lib/test/output/test_extcall
View file @
ceccc3c0
...
...
@@ -25,7 +25,12 @@ g() got multiple values for keyword argument 'b'
f() keywords must be strings
h() got an unexpected keyword argument 'e'
h() argument after * must be a sequence
dir() argument after * must be a sequence
None object argument after * must be a sequence
h() argument after ** must be a dictionary
dir() argument after ** must be a dictionary
None object argument after ** must be a dictionary
dir() got multiple values for keyword argument 'b'
3 512 1
3
3
...
...
Lib/test/test_extcall.py
View file @
ceccc3c0
...
...
@@ -137,6 +137,20 @@ except TypeError, err:
else
:
print
"should raise TypeError: * argument must be a tuple"
try
:
dir
(
*
h
)
except
TypeError
,
err
:
print
err
else
:
print
"should raise TypeError: * argument must be a tuple"
try
:
None
(
*
h
)
except
TypeError
,
err
:
print
err
else
:
print
"should raise TypeError: * argument must be a tuple"
try
:
h
(
**
h
)
except
TypeError
,
err
:
...
...
@@ -144,6 +158,27 @@ except TypeError, err:
else
:
print
"should raise TypeError: ** argument must be a dictionary"
try
:
dir
(
**
h
)
except
TypeError
,
err
:
print
err
else
:
print
"should raise TypeError: ** argument must be a dictionary"
try
:
None
(
**
h
)
except
TypeError
,
err
:
print
err
else
:
print
"should raise TypeError: ** argument must be a dictionary"
try
:
dir
(
b
=
1
,
**
{
'b'
:
1
})
except
TypeError
,
err
:
print
err
else
:
print
"should raise TypeError: dir() got multiple values for keyword argument 'b'"
def
f2
(
*
a
,
**
b
):
return
a
,
b
...
...
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