Anonymous avatar Anonymous committed b91be9d

split test to isolate py 2.7 specific syntax and get tests back to green with py 2.5

Comments (0)

Files changed (4)

test/input/func_unpack_exception_py27.py

+"""Test for W0623, overwriting names in exception handlers."""
+
+__revision__ = ''
+
+def new_style():
+    """Some exceptions can be unpacked."""
+    try:
+        pass
+    except IOError as (errno, message): # this is fine
+        print errno, message
+    except IOError as (new_style, tuple): # W0623 twice
+        print new_style, tuple
+        

test/input/func_w0623.py

 except MyOtherError, exc5: # this is fine
     print exc5
 
-def new_style():
-    """Some exceptions can be unpacked."""
-    try:
-        pass
-    except IOError as (errno, message): # this is fine
-        print errno, message
-    except IOError as (new_style, tuple): # W0623 twice
-        print new_style, tuple
-        

test/messages/func_unpack_exception_py27.txt

+W: 11:new_style: Redefining name 'new_style' from outer scope (line 5) in exception handler
+W: 11:new_style: Redefining name 'tuple' from builtins in exception handler
+

test/messages/func_w0623.txt

 W: 45: Redefining name 'RuntimeError' from object 'exceptions' in exception handler
 W: 47: Redefining name 'OSError' from builtins in exception handler
 W: 49: Redefining name 'MyOtherError' from outer scope (line 36) in exception handler
-W: 73:new_style: Redefining name 'new_style' from outer scope (line 67) in exception handler
-W: 73:new_style: Redefining name 'tuple' from builtins in exception handler
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.