Fix test data broken due to updated behavior of PyFile#getImportBlock()
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Wed, 15 Jun 2016 17:16:04 +0000 (20:16 +0300)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Wed, 15 Jun 2016 17:46:01 +0000 (20:46 +0300)
Previously this method didn't consider import statement below the
first line comment so import optimizer didn't touch the file as if
all its imports were in order.

python/testData/refactoring/move/relativeImportsInsideMovedModule/after/src/subpkg1/mod1.py

index e9cea1c3d39b9f761e8a90fc469fd5864afe1fd1..2b8de1e2ee840ad46aad824bbd055fc7d9c707b4 100644 (file)
@@ -1,15 +1,13 @@
-from pkg1 import subpkg2
-from pkg1.subpkg2 import mod2
-from pkg1.subpkg2.mod2 import VAR
-from . import mod3
-
-# malformed imports
+import
+from
 from
-from import
-from pkg1.subpkg2 import
 
-# absolute imports
 import pkg1.subpkg2 as foo
+from pkg1 import subpkg2
 from pkg1 import subpkg2 as bar
+from pkg1.subpkg2 import
+from pkg1.subpkg2 import mod2
+from pkg1.subpkg2.mod2 import VAR
+from . import mod3
 
 print(subpkg2, mod3, mod2, foo, bar, VAR)