Index: Lib/lib2to3/tests/test_fixers.py =================================================================== --- Lib/lib2to3/tests/test_fixers.py (revision 83167) +++ Lib/lib2to3/tests/test_fixers.py (working copy) @@ -1843,6 +1843,19 @@ """ % (new_import, new, member, new, member) self.check(b, a) + def test_import_indentation(self): + b = ''' +def foo(): + from urllib import urlencode, urlopen + print('got here') +''' + a = ''' +def foo(): + from urllib.parse import urlencode + from urllib.parse import urlopen + print('got here') +''' + self.check(b, a) class Test_input(FixerTestCase): fixer = "input"