[Python-checkins] r54018 - python/branches/p3yk_no_args_on_exc/Lib/test/test_cgi.py python/branches/p3yk_no_args_on_exc/Lib/test/test_compiler.py

brett.cannon python-checkins at python.org
Wed Feb 28 18:37:57 CET 2007


Author: brett.cannon
Date: Wed Feb 28 18:37:52 2007
New Revision: 54018

Modified:
   python/branches/p3yk_no_args_on_exc/Lib/test/test_cgi.py
   python/branches/p3yk_no_args_on_exc/Lib/test/test_compiler.py
Log:
Fixes for BaseException.args removal.


Modified: python/branches/p3yk_no_args_on_exc/Lib/test/test_cgi.py
==============================================================================
--- python/branches/p3yk_no_args_on_exc/Lib/test/test_cgi.py	(original)
+++ python/branches/p3yk_no_args_on_exc/Lib/test/test_cgi.py	Wed Feb 28 18:37:52 2007
@@ -30,7 +30,7 @@
         if not isinstance(anExc, Exception):
             return NotImplemented
         return (self.err.__class__ == anExc.__class__ and
-                self.err.args == anExc.args)
+                self.err.message == anExc.message)
 
     def __getattr__(self, attr):
         return getattr(self.err, attr)

Modified: python/branches/p3yk_no_args_on_exc/Lib/test/test_compiler.py
==============================================================================
--- python/branches/p3yk_no_args_on_exc/Lib/test/test_compiler.py	(original)
+++ python/branches/p3yk_no_args_on_exc/Lib/test/test_compiler.py	Wed Feb 28 18:37:52 2007
@@ -50,9 +50,7 @@
                     try:
                         compiler.compile(buf, basename, "exec")
                     except Exception as e:
-                        args = list(e.args)
-                        args[0] += "[in file %s]" % basename
-                        e.args = tuple(args)
+                        args.message += "[in file %s]" % basename
                         raise
 
     def testNewClassSyntax(self):


More information about the Python-checkins mailing list