Skip to content

Commit 07269f1

Browse files
author
brett.cannon
committed
Rename the test_traceback_print() function to traceback_print() to prevent
test_capi from automatically calling the function. git-svn-id: http://svn.python.org/projects/python/trunk@62558 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent afbf457 commit 07269f1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/test/test_traceback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test cases for traceback module"""
22

3-
from _testcapi import test_traceback_print
3+
from _testcapi import traceback_print
44
from StringIO import StringIO
55
import sys
66
import unittest
@@ -13,7 +13,7 @@
1313
except KeyError:
1414
type_, value, tb = sys.exc_info()
1515
file_ = StringIO()
16-
test_traceback_print(tb, file_)
16+
traceback_print(tb, file_)
1717
example_traceback = file_.getvalue()
1818
else:
1919
raise Error("unable to create test traceback string")

Modules/_testcapimodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,13 +736,13 @@ test_with_docstring(PyObject *self)
736736

737737
/* To test the format of tracebacks as printed out. */
738738
static PyObject *
739-
test_traceback_print(PyObject *self, PyObject *args)
739+
traceback_print(PyObject *self, PyObject *args)
740740
{
741741
PyObject *file;
742742
PyObject *traceback;
743743
int result;
744744

745-
if (!PyArg_ParseTuple(args, "OO:test_traceback_print",
745+
if (!PyArg_ParseTuple(args, "OO:traceback_print",
746746
&traceback, &file))
747747
return NULL;
748748

@@ -792,7 +792,7 @@ static PyMethodDef TestMethods[] = {
792792
#ifdef WITH_THREAD
793793
{"_test_thread_state", test_thread_state, METH_VARARGS},
794794
#endif
795-
{"test_traceback_print", test_traceback_print, METH_VARARGS},
795+
{"traceback_print", traceback_print, METH_VARARGS},
796796
{NULL, NULL} /* sentinel */
797797
};
798798

0 commit comments

Comments
 (0)