From 8dc43032971710883b3ee156bd01509b85648596 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 28 Apr 2008 04:50:06 +0000 Subject: [PATCH] Rename the test_traceback_print() function to traceback_print() to prevent test_capi from automatically calling the function. --- Lib/test/test_traceback.py | 4 ++-- Modules/_testcapimodule.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index a3a5e394a51..96b8938d365 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -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 @@ try: 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") diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 8b4dbce60ae..4a00fb1975b 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -736,13 +736,13 @@ test_with_docstring(PyObject *self) /* 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 @@ static PyMethodDef TestMethods[] = { #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 */ };