mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
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. ........
This commit is contained in:
parent
b46d6ff279
commit
0147a761b1
2 changed files with 12 additions and 1 deletions
|
@ -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__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue