[Python-checkins] r62558 - in python/trunk: Lib/test/test_traceback.py Modules/_testcapimodule.c
brett.cannon
python-checkins at python.org
Mon Apr 28 06:50:06 CEST 2008
Author: brett.cannon
Date: Mon Apr 28 06:50:06 2008
New Revision: 62558
Log:
Rename the test_traceback_print() function to traceback_print() to prevent
test_capi from automatically calling the function.
Modified:
python/trunk/Lib/test/test_traceback.py
python/trunk/Modules/_testcapimodule.c
Modified: python/trunk/Lib/test/test_traceback.py
==============================================================================
--- python/trunk/Lib/test/test_traceback.py (original)
+++ python/trunk/Lib/test/test_traceback.py Mon Apr 28 06:50:06 2008
@@ -1,6 +1,6 @@
"""Test cases for traceback module"""
-from _testcapi import test_traceback_print
+from _testcapi import traceback_print
from StringIO import StringIO
import sys
import unittest
@@ -13,7 +13,7 @@
except KeyError:
type_, value, tb = sys.exc_info()
file_ = StringIO()
- test_traceback_print(tb, file_)
+ traceback_print(tb, file_)
example_traceback = file_.getvalue()
else:
raise Error("unable to create test traceback string")
Modified: python/trunk/Modules/_testcapimodule.c
==============================================================================
--- python/trunk/Modules/_testcapimodule.c (original)
+++ python/trunk/Modules/_testcapimodule.c Mon Apr 28 06:50:06 2008
@@ -736,13 +736,13 @@
/* To test the format of tracebacks as printed out. */
static PyObject *
-test_traceback_print(PyObject *self, PyObject *args)
+traceback_print(PyObject *self, PyObject *args)
{
PyObject *file;
PyObject *traceback;
int result;
- if (!PyArg_ParseTuple(args, "OO:test_traceback_print",
+ if (!PyArg_ParseTuple(args, "OO:traceback_print",
&traceback, &file))
return NULL;
@@ -792,7 +792,7 @@
#ifdef WITH_THREAD
{"_test_thread_state", test_thread_state, METH_VARARGS},
#endif
- {"test_traceback_print", test_traceback_print, METH_VARARGS},
+ {"traceback_print", traceback_print, METH_VARARGS},
{NULL, NULL} /* sentinel */
};
More information about the Python-checkins
mailing list