[pypy-svn] r58819 - pypy/branch/2.5-merge/lib-python/modified-2.5.2/test

iko at codespeak.net iko at codespeak.net
Wed Oct 8 15:17:07 CEST 2008


Author: iko
Date: Wed Oct  8 15:17:06 2008
New Revision: 58819

Modified:
   pypy/branch/2.5-merge/lib-python/modified-2.5.2/test/test_exceptions.py
Log:
(iko, cfbolz)
SynatxError arg checking is more stringent in PyPy



Modified: pypy/branch/2.5-merge/lib-python/modified-2.5.2/test/test_exceptions.py
==============================================================================
--- pypy/branch/2.5-merge/lib-python/modified-2.5.2/test/test_exceptions.py	(original)
+++ pypy/branch/2.5-merge/lib-python/modified-2.5.2/test/test_exceptions.py	Wed Oct  8 15:17:06 2008
@@ -6,7 +6,7 @@
 import warnings
 import pickle, cPickle
 
-from test.test_support import TESTFN, unlink, run_unittest
+from test.test_support import TESTFN, unlink, run_unittest, check_impl_details
 
 # XXX This is not really enough, each *operation* should be tested!
 
@@ -241,13 +241,6 @@
                                       'offsetStr', 'textStr')),
                  'print_file_and_line' : None, 'msg' : 'msgStr',
                  'filename' : 'filenameStr', 'lineno' : 'linenoStr'}),
-            (SyntaxError, ('msgStr', 'filenameStr', 'linenoStr', 'offsetStr',
-                           'textStr', 'print_file_and_lineStr'),
-                {'message' : '', 'text' : None,
-                 'args' : ('msgStr', 'filenameStr', 'linenoStr', 'offsetStr',
-                           'textStr', 'print_file_and_lineStr'),
-                 'print_file_and_line' : None, 'msg' : 'msgStr',
-                 'filename' : None, 'lineno' : None, 'offset' : None}),
             (UnicodeError, (), {'message' : '', 'args' : (),}),
             (UnicodeEncodeError, ('ascii', u'a', 0, 1, 'ordinal not in range'),
                 {'message' : '', 'args' : ('ascii', u'a', 0, 1,
@@ -264,6 +257,17 @@
                  'object' : u'\u3042', 'reason' : 'ouch',
                  'start' : 0, 'end' : 1}),
         ]
+        if check_impl_details:
+            exceptionList.append(
+            (SyntaxError, ('msgStr', 'filenameStr', 'linenoStr', 'offsetStr',
+                           'textStr', 'print_file_and_lineStr'),
+                {'message' : '', 'text' : None,
+                 'args' : ('msgStr', 'filenameStr', 'linenoStr', 'offsetStr',
+                           'textStr', 'print_file_and_lineStr'),
+                 'print_file_and_line' : None, 'msg' : 'msgStr',
+                 'filename' : None, 'lineno' : None, 'offset' : None})
+            )
+                
         try:
             exceptionList.append(
                 (WindowsError, (1, 'strErrorStr', 'filenameStr'),



More information about the Pypy-commit mailing list