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
8dc43032
Commit
8dc43032
authored
Apr 28, 2008
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the test_traceback_print() function to traceback_print() to prevent
test_capi from automatically calling the function.
parent
b8bdbc04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_traceback.py
Lib/test/test_traceback.py
+2
-2
Modules/_testcapimodule.c
Modules/_testcapimodule.c
+3
-3
No files found.
Lib/test/test_traceback.py
View file @
8dc43032
"""Test cases for traceback module"""
from
_testcapi
import
t
est_t
raceback_print
from
_testcapi
import
traceback_print
from
StringIO
import
StringIO
import
sys
import
unittest
...
...
@@ -13,7 +13,7 @@ try:
except
KeyError
:
type_
,
value
,
tb
=
sys
.
exc_info
()
file_
=
StringIO
()
t
est_t
raceback_print
(
tb
,
file_
)
traceback_print
(
tb
,
file_
)
example_traceback
=
file_
.
getvalue
()
else
:
raise
Error
(
"unable to create test traceback string"
)
...
...
Modules/_testcapimodule.c
View file @
8dc43032
...
...
@@ -736,13 +736,13 @@ test_with_docstring(PyObject *self)
/* To test the format of tracebacks as printed out. */
static
PyObject
*
t
est_t
raceback_print
(
PyObject
*
self
,
PyObject
*
args
)
traceback_print
(
PyObject
*
self
,
PyObject
*
args
)
{
PyObject
*
file
;
PyObject
*
traceback
;
int
result
;
if
(
!
PyArg_ParseTuple
(
args
,
"OO:t
est_t
raceback_print"
,
if
(
!
PyArg_ParseTuple
(
args
,
"OO:traceback_print"
,
&
traceback
,
&
file
))
return
NULL
;
...
...
@@ -792,7 +792,7 @@ static PyMethodDef TestMethods[] = {
#ifdef WITH_THREAD
{
"_test_thread_state"
,
test_thread_state
,
METH_VARARGS
},
#endif
{
"t
est_traceback_print"
,
test_
traceback_print
,
METH_VARARGS
},
{
"t
raceback_print"
,
traceback_print
,
METH_VARARGS
},
{
NULL
,
NULL
}
/* sentinel */
};
...
...
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