summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-19 14:14:06 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-07-19 14:14:06 (GMT)
commit0147a761b1751a833bb11e176833be7082322b86 (patch)
tree0778824d463006c12ecf2f0459c7d9ebf24c4151 /Lib/lib2to3/tests
parentb46d6ff279bed9d9452da4bbc6a26319120e5f8e (diff)
downloadcpython-0147a761b1751a833bb11e176833be7082322b86.zip
cpython-0147a761b1751a833bb11e176833be7082322b86.tar.gz
cpython-0147a761b1751a833bb11e176833be7082322b86.tar.bz2
Merged revisions 65137 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r65137 | georg.brandl | 2008-07-19 08:32:57 -0500 (Sat, 19 Jul 2008) | 2 lines #3334: correctly set prefix of imports. ........
Diffstat (limited to 'Lib/lib2to3/tests')
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index eccbfc0..f5aaa8d 100755
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -3319,6 +3319,17 @@ class Test_import(FixerTestCase):
a = "from . import foo.bar as bang"
self.check_both(b, a)
+ def test_prefix(self):
+ b = """
+ # prefix
+ import foo.bar
+ """
+ a = """
+ # prefix
+ from . import foo.bar
+ """
+ self.check_both(b, a)
+
if __name__ == "__main__":
import __main__