summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_fixers.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/tests/test_fixers.py')
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index d1a231d..d1d2509 100755
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -10,13 +10,14 @@ except ImportError:
# Python imports
import unittest
+from itertools import chain
from os.path import dirname, pathsep
# Local imports
from .. import pygram
from .. import pytree
from .. import refactor
-from ..fixes import util
+from .. import fixer_util
class Options:
@@ -29,11 +30,10 @@ class Options:
class FixerTestCase(support.TestCase):
def setUp(self):
options = Options(fix=[self.fixer], print_function=False)
- self.refactor = refactor.RefactoringTool(options)
+ self.refactor = refactor.RefactoringTool("lib2to3/fixes", options)
self.fixer_log = []
self.filename = "<string>"
- from itertools import chain
for order in (self.refactor.pre_order.values(),\
self.refactor.post_order.values()):
for fixer in chain(*order):
@@ -70,7 +70,7 @@ class FixerTestCase(support.TestCase):
fix = [self.fixer]
fix.extend(names)
options = Options(fix=fix, print_function=False)
- r = refactor.RefactoringTool(options)
+ r = refactor.RefactoringTool("lib2to3/fixes", options)
(pre, post) = r.get_fixers()
n = "fix_" + self.fixer
if post and post[-1].__class__.__module__.endswith(n):
@@ -1109,7 +1109,7 @@ class Test_dict(FixerTestCase):
self.check(b, a)
def test_unchanged(self):
- for wrapper in util.consuming_calls:
+ for wrapper in fixer_util.consuming_calls:
s = "s = %s(d.keys())" % wrapper
self.unchanged(s)
@@ -1302,7 +1302,7 @@ class Test_xrange(FixerTestCase):
self.unchanged("x in range(10, 3, 9)")
def test_in_consuming_context(self):
- for call in util.consuming_calls:
+ for call in fixer_util.consuming_calls:
self.unchanged("a = %s(range(10))" % call)
class Test_raw_input(FixerTestCase):