Update of /cvsroot/cvs-syncmail/syncmail/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv14072
Modified Files:
Tag: new-config-branch
unittest.py
Log Message:
Make the module compatible with Python 1.5.2.
Index: unittest.py
===================================================================
RCS file: /cvsroot/cvs-syncmail/syncmail/tests/Attic/unittest.py,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- unittest.py 11 Jul 2003 04:38:12 -0000 1.1.2.1
+++ unittest.py 11 Jul 2003 04:39:29 -0000 1.1.2.2
@@ -115,7 +115,8 @@
def _exc_info_to_string(self, err):
"""Converts a sys.exc_info()-style tuple of values into a string."""
- return string.join(traceback.format_exception(*err), '')
+ lines = traceback.format_exception(err[0], err[1], err[2])
+ return string.join(lines, '')
def __repr__(self):
return "<%s run=%i errors=%i failures=%i>" % \
@@ -276,7 +277,7 @@
unexpected exception.
"""
try:
- callableObj(*args, **kwargs)
+ apply(callableObj, args, kwargs)
except excClass:
return
else:
@@ -560,8 +561,8 @@
def __getattr__(self, attr):
return getattr(self.stream,attr)
- def writeln(self, *args):
- if args: self.write(*args)
+ def writeln(self, arg=None):
+ if args is not None: self.write(arg)
self.write('\n') # text-mode streams translate to \r\n if needed
|