[Python-checkins] r54449 - sandbox/trunk/2to3/tests/test_fixers.py
collin.winter
python-checkins at python.org
Mon Mar 19 23:04:26 CET 2007
Author: collin.winter
Date: Mon Mar 19 23:04:24 2007
New Revision: 54449
Modified:
sandbox/trunk/2to3/tests/test_fixers.py
Log:
Additional assignment tests for fix_next.
Modified: sandbox/trunk/2to3/tests/test_fixers.py
==============================================================================
--- sandbox/trunk/2to3/tests/test_fixers.py (original)
+++ sandbox/trunk/2to3/tests/test_fixers.py Mon Mar 19 23:04:24 2007
@@ -1430,6 +1430,17 @@
"""
self.warns(s, s, "Calls to builtin next() possibly shadowed")
+ def test_builtin_assign_in_list(self):
+ s = """
+ def foo():
+ [a, __builtin__.next] = foo
+
+ class A:
+ def next(self, a, b):
+ pass
+ """
+ self.warns(s, s, "Calls to builtin next() possibly shadowed")
+
def test_assign_to_next(self):
s = """
def foo():
@@ -1451,6 +1462,17 @@
pass
"""
self.check(s, s)
+
+ def test_assign_to_next_in_list(self):
+ s = """
+ def foo():
+ [a, A.next] = foo
+
+ class A:
+ def next(self, a, b):
+ pass
+ """
+ self.check(s, s)
def test_shadowing_import_1(self):
s = """
More information about the Python-checkins
mailing list