summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_fixers.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-03-19 05:33:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-03-19 05:33:36 (GMT)
commit8a5f8ca33b56db9af973d1f34a9b3df5271b56c0 (patch)
tree55b17647085ff8b679f2bea803545884148c66e4 /Lib/lib2to3/tests/test_fixers.py
parentf733c60d9aea123a46cd41dbe4dedee7aa2f20f3 (diff)
downloadcpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.zip
cpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.tar.gz
cpython-8a5f8ca33b56db9af973d1f34a9b3df5271b56c0.tar.bz2
Run 2to3 on this library.
Diffstat (limited to 'Lib/lib2to3/tests/test_fixers.py')
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index 0fb0984..eacb787 100755
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -18,7 +18,7 @@ from .. import refactor
class Options:
def __init__(self, **kwargs):
- for k, v in kwargs.items():
+ for k, v in list(kwargs.items()):
setattr(self, k, v)
self.verbose = False
@@ -1285,7 +1285,7 @@ class Test_imports(FixerTestCase):
}
def test_import_module(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
b = "import %s" % old
a = "import %s" % new
self.check(b, a)
@@ -1295,7 +1295,7 @@ class Test_imports(FixerTestCase):
self.check(b, a)
def test_import_from(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
for member in members:
b = "from %s import %s" % (old, member)
a = "from %s import %s" % (new, member)
@@ -1305,7 +1305,7 @@ class Test_imports(FixerTestCase):
self.unchanged(s)
def test_import_module_as(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
b = "import %s as foo_bar" % old
a = "import %s as foo_bar" % new
self.check(b, a)
@@ -1315,7 +1315,7 @@ class Test_imports(FixerTestCase):
self.check(b, a)
def test_import_from_as(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
for member in members:
b = "from %s import %s as foo_bar" % (old, member)
a = "from %s import %s as foo_bar" % (new, member)
@@ -1327,7 +1327,7 @@ class Test_imports(FixerTestCase):
self.warns_unchanged(s, "Cannot handle star imports")
def test_import_module_usage(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
for member in members:
b = """
import %s
@@ -1340,7 +1340,7 @@ class Test_imports(FixerTestCase):
self.check(b, a)
def test_from_import_usage(self):
- for old, (new, members) in self.modules.items():
+ for old, (new, members) in list(self.modules.items()):
for member in members:
b = """
from %s import %s
@@ -2211,7 +2211,7 @@ class Test_renames(FixerTestCase):
}
def test_import_from(self):
- for mod, (old, new) in self.modules.items():
+ for mod, (old, new) in list(self.modules.items()):
b = "from %s import %s" % (mod, old)
a = "from %s import %s" % (mod, new)
self.check(b, a)
@@ -2220,13 +2220,13 @@ class Test_renames(FixerTestCase):
self.unchanged(s)
def test_import_from_as(self):
- for mod, (old, new) in self.modules.items():
+ for mod, (old, new) in list(self.modules.items()):
b = "from %s import %s as foo_bar" % (mod, old)
a = "from %s import %s as foo_bar" % (mod, new)
self.check(b, a)
def test_import_module_usage(self):
- for mod, (old, new) in self.modules.items():
+ for mod, (old, new) in list(self.modules.items()):
b = """
import %s
foo(%s, %s.%s)
@@ -2239,7 +2239,7 @@ class Test_renames(FixerTestCase):
def XXX_test_from_import_usage(self):
# not implemented yet
- for mod, (old, new) in self.modules.items():
+ for mod, (old, new) in list(self.modules.items()):
b = """
from %s import %s
foo(%s, %s)