diff options
author | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 (GMT) |
commit | 68468eba635570400f607e140425a222018e56f9 (patch) | |
tree | 2176c8822392383a88caa0a2209a1d2f3446d45c /Lib/unittest.py | |
parent | f389c7727362321a91dbaff13b7e1cef6cbaa3d8 (diff) | |
download | cpython-68468eba635570400f607e140425a222018e56f9.zip cpython-68468eba635570400f607e140425a222018e56f9.tar.gz cpython-68468eba635570400f607e140425a222018e56f9.tar.bz2 |
Get rid of many apply() calls.
Diffstat (limited to 'Lib/unittest.py')
-rw-r--r-- | Lib/unittest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py index 31d9cb4..e85dcd1 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -115,7 +115,7 @@ class TestResult: def _exc_info_to_string(self, err): """Converts a sys.exc_info()-style tuple of values into a string.""" - return string.join(apply(traceback.format_exception, err), '') + return string.join(traceback.format_exception(*err), '') def __repr__(self): return "<%s run=%i errors=%i failures=%i>" % \ @@ -276,7 +276,7 @@ class TestCase: unexpected exception. """ try: - apply(callableObj, args, kwargs) + callableObj(*args, **kwargs) except excClass: return else: @@ -561,7 +561,7 @@ class _WritelnDecorator: return getattr(self.stream,attr) def writeln(self, *args): - if args: apply(self.write, args) + if args: self.write(*args) self.write('\n') # text-mode streams translate to \r\n if needed |