Merge idea133 into master

This CL merges the following CLs from aosp/idea133 into aosp/master.

dabd634b Snapshot e2750ea61032f2a041cb012bb7b90cffa0deba73 from idea/133.124 of git://git.jetbrains.org/idea/community.git
29ab773f Make default test target run Android specific tests
967117a7 Merge "Make default test target run Android specific tests" into idea133
1eb71f20 Bump memory settings for unit tests
b13ea0d4 Don't bind the delete key to restoring property in layout editor
a20ccfa9 Add Gradle import module
0980f4a2 Add gradle-import to build script
cee6f8ca Fix Gradle notification lookup on Windows.
8668e1be Snapshot 020d29497847701e84e383d965abf543b80758e2 from idea/133.370 of git://git.jetbrains.org/idea/community.git
18f77669 Merge remote-tracking branch 'aosp/snapshot-master' into merge
36ac8cba Update from Guava 13.0.1 to Guava 15
4d451f93 Update libraries to lombok 0.2.2
ee06b1d0 Remove lint-cli dependency from the idea project
ab73dade Updater: add unit tests.
dd558b6e Updater: on Windows, add "Retry" on file op failures.
f2f7178a Snapshot c11f3ac9bbde3f85d1f837ec3eb48a395ed7dd10 from idea/133.471 of git://git.jetbrains.org/idea/community.git
5e4c77db Merge remote-tracking branch 'aosp/snapshot-master' into merge
8d957349 Fix junit.jar path in updater project.
58c3e0ae Include cloud tools tests in default test group
63cd9779 Temporarily disable errors in project structure dialog
e2d6089d Snapshot b9931c55d2175b6552f90b2225eb09c13bd6dfed from idea/133.609 of git://git.jetbrains.org/idea/community.git
031a291e Merge remote-tracking branch 'aosp/snapshot-master' into merge
ea628d6e Remove versions from Info.plist
809cb3e7 Snapshot 9e6329d622cc9649c9c035f28faddc29564a5b7a from idea/133.696 of git://git.jetbrains.org/idea/community.git
d6cfe6ec Merge remote-tracking branch 'aosp/snapshot-master' into merge
38f8c6f0 Gracefully handle build.gradle files in modules without a configured JDK
70ae6f2a Snapshot dc1944e804515a346297e368c3b9c35a203c9912 from idea/133.818 of git://git.jetbrains.org/idea/community.git
ac91a6de Merge remote-tracking branch 'aosp/snapshot-master' into merge
2f51d957 Gradle: respect build classpath order and use both classes and sources jars if available
0ecdb509 Snapshot c50a8ad26a72432f26e39046d6a6f21fd7a190ee from idea/134.1160 of git://git.jetbrains.org/idea/community.git
e8c22ad7 Merge remote-tracking branch 'aosp/snapshot-master' into merge
72253f7d Turn off android framework detection
93f77ee6 Temporarily remove GCT tests
88f318c9 Snapshot 34f078c3452e79ba209d28a551962857e0970e5d from idea/134.1342 of git://git.jetbrains.org/idea/community.git
afb54e4b Merge remote-tracking branch 'aosp/snapshot-master' into merge
4dc795dc Fix updater UI tests.
57a49ed1 Studio patch: more logging.
aa614ee0 table greyer (ability to disable a table)
5c571417 Use Gradle model prebuilts v0.9.0 in Studio.
cb38c25d build script: Run jarjar on the updater
f273ca07 Add App Engine templates dir to build
7607404f Removed android-builder library from Studio (not needed.)
8f29b4eb Merge idea133 changes into master

Change-Id: I12231f26e886dbf5e2e5ac0b1c4bfe18f274d78f
diff --git a/python/testData/addImport/comment.after.py b/python/testData/addImport/comment.after.py
index 777f480..a816490 100644
--- a/python/testData/addImport/comment.after.py
+++ b/python/testData/addImport/comment.after.py
@@ -1 +1 @@
-from urllib import urlopen, urlencode, unquote_plus   # this is a comment
\ No newline at end of file
+from urllib import urlopen, urlencode, unquote_plus  # this is a comment
\ No newline at end of file
diff --git a/python/testData/completion/epydocParamTag.py b/python/testData/completion/epydocParamTag.py
index 6323111..e74df8d 100644
--- a/python/testData/completion/epydocParamTag.py
+++ b/python/testData/completion/epydocParamTag.py
@@ -1,2 +1,2 @@
 def foo(bar):
-    """ @param <caret> """
\ No newline at end of file
+    """ @param b<caret> """
\ No newline at end of file
diff --git a/python/testData/completion/identifiersInPlainDocstring.after.py b/python/testData/completion/identifiersInPlainDocstring.after.py
deleted file mode 100644
index 440570b..0000000
--- a/python/testData/completion/identifiersInPlainDocstring.after.py
+++ /dev/null
@@ -1,2 +0,0 @@
-def foo(bar):
-    """ Variable bar """
\ No newline at end of file
diff --git a/python/testData/formatter/alignInCallExpression.py b/python/testData/formatter/alignInCallExpression.py
new file mode 100644
index 0000000..0c1dff1
--- /dev/null
+++ b/python/testData/formatter/alignInCallExpression.py
@@ -0,0 +1,3 @@
+foo(1 +
+    x.
+        call())
\ No newline at end of file
diff --git a/python/testData/formatter/alignInCallExpression_after.py b/python/testData/formatter/alignInCallExpression_after.py
new file mode 100644
index 0000000..48c17a1
--- /dev/null
+++ b/python/testData/formatter/alignInCallExpression_after.py
@@ -0,0 +1,3 @@
+foo(1 +
+    x.
+    call())
\ No newline at end of file
diff --git a/python/testData/formatter/alignInNestedCallInWith.py b/python/testData/formatter/alignInNestedCallInWith.py
new file mode 100644
index 0000000..ccf3783
--- /dev/null
+++ b/python/testData/formatter/alignInNestedCallInWith.py
@@ -0,0 +1,10 @@
+import logging
+from nose.tools import assert_raises_regex
+
+
+def _assert_stuff(i):
+    with assert_raises_regex(
+            logging.INFO,
+            'Did stuff to {} because of reasons that take up a whole line of text'.format(
+                    i.relname)):
+        pass
\ No newline at end of file
diff --git a/python/testData/formatter/alignInNestedCallInWith_after.py b/python/testData/formatter/alignInNestedCallInWith_after.py
new file mode 100644
index 0000000..b64caa7
--- /dev/null
+++ b/python/testData/formatter/alignInNestedCallInWith_after.py
@@ -0,0 +1,10 @@
+import logging
+from nose.tools import assert_raises_regex
+
+
+def _assert_stuff(i):
+    with assert_raises_regex(
+            logging.INFO,
+            'Did stuff to {} because of reasons that take up a whole line of text'.format(
+             i.relname)):
+        pass
\ No newline at end of file
diff --git a/python/testData/formatter/alignInParameterList.py b/python/testData/formatter/alignInParameterList.py
new file mode 100644
index 0000000..1a79766
--- /dev/null
+++ b/python/testData/formatter/alignInParameterList.py
@@ -0,0 +1,4 @@
+def foo(x=
+        y.
+            call()):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/alignInParameterList_after.py b/python/testData/formatter/alignInParameterList_after.py
new file mode 100644
index 0000000..c3291b2
--- /dev/null
+++ b/python/testData/formatter/alignInParameterList_after.py
@@ -0,0 +1,4 @@
+def foo(x=
+        y.
+        call()):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/alignInParenthesizedExpression.py b/python/testData/formatter/alignInParenthesizedExpression.py
new file mode 100644
index 0000000..ea97ade
--- /dev/null
+++ b/python/testData/formatter/alignInParenthesizedExpression.py
@@ -0,0 +1,8 @@
+print(1 + (1 + (1
+                +
+                x
+                    .calc())
+           +
+           x.
+               calc()
+))
\ No newline at end of file
diff --git a/python/testData/formatter/alignInParenthesizedExpression_after.py b/python/testData/formatter/alignInParenthesizedExpression_after.py
new file mode 100644
index 0000000..868557c
--- /dev/null
+++ b/python/testData/formatter/alignInParenthesizedExpression_after.py
@@ -0,0 +1,8 @@
+print(1 + (1 + (1
+                +
+                x
+                .calc())
+           +
+           x.
+           calc()
+))
\ No newline at end of file
diff --git a/python/testData/formatter/alignListComprehensionInDict.py b/python/testData/formatter/alignListComprehensionInDict.py
new file mode 100644
index 0000000..7b74279
--- /dev/null
+++ b/python/testData/formatter/alignListComprehensionInDict.py
@@ -0,0 +1,5 @@
+def foo():
+        return {field.key: field for key, field in inspect.getmembers(instance)
+                if isinstance(field, QueryableAttribute)
+                   and isinstance(field.property, ColumnProperty)
+        or field.foreign_keys}
\ No newline at end of file
diff --git a/python/testData/formatter/alignListComprehensionInDict_after.py b/python/testData/formatter/alignListComprehensionInDict_after.py
new file mode 100644
index 0000000..bcb4c22
--- /dev/null
+++ b/python/testData/formatter/alignListComprehensionInDict_after.py
@@ -0,0 +1,5 @@
+def foo():
+    return {field.key: field for key, field in inspect.getmembers(instance)
+            if isinstance(field, QueryableAttribute)
+            and isinstance(field.property, ColumnProperty)
+            or field.foreign_keys}
\ No newline at end of file
diff --git a/python/testData/formatter/commentAfterBlock.py b/python/testData/formatter/commentAfterBlock.py
new file mode 100644
index 0000000..fd8584a
--- /dev/null
+++ b/python/testData/formatter/commentAfterBlock.py
@@ -0,0 +1,5 @@
+def test():
+    if bar:
+        foo()
+    # comment
+    foobar()
\ No newline at end of file
diff --git a/python/testData/formatter/commentAfterBlock_after.py b/python/testData/formatter/commentAfterBlock_after.py
new file mode 100644
index 0000000..fd8584a
--- /dev/null
+++ b/python/testData/formatter/commentAfterBlock_after.py
@@ -0,0 +1,5 @@
+def test():
+    if bar:
+        foo()
+    # comment
+    foobar()
\ No newline at end of file
diff --git a/python/testData/formatter/commentBetweenClasses_after.py b/python/testData/formatter/commentBetweenClasses_after.py
index b852394..e97c76b 100644
--- a/python/testData/formatter/commentBetweenClasses_after.py
+++ b/python/testData/formatter/commentBetweenClasses_after.py
@@ -2,6 +2,7 @@
     def m1(self):
         pass
 
+
 # comment about T2
 
 class T2(object):
diff --git a/python/testData/formatter/commentInEmptyTuple.py b/python/testData/formatter/commentInEmptyTuple.py
new file mode 100644
index 0000000..fffda70
--- /dev/null
+++ b/python/testData/formatter/commentInEmptyTuple.py
@@ -0,0 +1,3 @@
+var_name = (
+# comment
+)
\ No newline at end of file
diff --git a/python/testData/formatter/commentInEmptyTuple_after.py b/python/testData/formatter/commentInEmptyTuple_after.py
new file mode 100644
index 0000000..a8572fd
--- /dev/null
+++ b/python/testData/formatter/commentInEmptyTuple_after.py
@@ -0,0 +1,3 @@
+var_name = (
+    # comment
+)
\ No newline at end of file
diff --git a/python/testData/formatter/continuationIndentInIndentingStatement.py b/python/testData/formatter/continuationIndentInIndentingStatement.py
new file mode 100644
index 0000000..38c7910
--- /dev/null
+++ b/python/testData/formatter/continuationIndentInIndentingStatement.py
@@ -0,0 +1,39 @@
+if True \
+    or False:
+    pass
+elif \
+    False:
+    pass
+
+for i in \
+    range(1, 100):
+    pass
+
+with open('file1') as file1, \
+    open('file2') as file2:
+    pass
+
+
+class \
+    A(object):
+    pass
+
+
+def \
+    foo():
+    pass
+
+
+try:
+    pass
+except \
+    AttributeError:
+    pass
+
+while value \
+    in values:  # <- missing continuation indent here
+    do_smth()
+
+if (1 + x.
+    value()):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/continuationIndentInIndentingStatement2.py b/python/testData/formatter/continuationIndentInIndentingStatement2.py
new file mode 100644
index 0000000..63957fb
--- /dev/null
+++ b/python/testData/formatter/continuationIndentInIndentingStatement2.py
@@ -0,0 +1,4 @@
+def f(value, value1, value2):
+    if value in (
+        value1, value2) or value == 0:   # <- missing continuation indent here
+        return False
\ No newline at end of file
diff --git a/python/testData/formatter/continuationIndentInIndentingStatement2_after.py b/python/testData/formatter/continuationIndentInIndentingStatement2_after.py
new file mode 100644
index 0000000..b76f2ac
--- /dev/null
+++ b/python/testData/formatter/continuationIndentInIndentingStatement2_after.py
@@ -0,0 +1,4 @@
+def f(value, value1, value2):
+    if value in (
+            value1, value2) or value == 0:  # <- missing continuation indent here
+        return False
\ No newline at end of file
diff --git a/python/testData/formatter/continuationIndentInIndentingStatement_after.py b/python/testData/formatter/continuationIndentInIndentingStatement_after.py
new file mode 100644
index 0000000..be17337
--- /dev/null
+++ b/python/testData/formatter/continuationIndentInIndentingStatement_after.py
@@ -0,0 +1,39 @@
+if True \
+        or False:
+    pass
+elif \
+        False:
+    pass
+
+for i in \
+        range(1, 100):
+    pass
+
+with open('file1') as file1, \
+        open('file2') as file2:
+    pass
+
+
+class \
+        A(object):
+    pass
+
+
+def \
+        foo():
+    pass
+
+
+try:
+    pass
+except \
+        AttributeError:
+    pass
+
+while value \
+        in values:  # <- missing continuation indent here
+    do_smth()
+
+if (1 + x.
+        value()):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/indentParensInImport.py b/python/testData/formatter/indentParensInImport.py
new file mode 100644
index 0000000..ab20f1b
--- /dev/null
+++ b/python/testData/formatter/indentParensInImport.py
@@ -0,0 +1,3 @@
+from some.module import (
+    thing
+    )
\ No newline at end of file
diff --git a/python/testData/formatter/indentParensInImport_after.py b/python/testData/formatter/indentParensInImport_after.py
new file mode 100644
index 0000000..2ad9216
--- /dev/null
+++ b/python/testData/formatter/indentParensInImport_after.py
@@ -0,0 +1,3 @@
+from some.module import (
+    thing
+)
\ No newline at end of file
diff --git a/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py
new file mode 100644
index 0000000..c908253
--- /dev/null
+++ b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py
@@ -0,0 +1,18 @@
+class A(object):
+    pass
+
+# comment
+def one():
+    pass
+
+# comment
+def two():
+    pass
+
+# comment
+class B(object):
+    pass
+
+# comment
+class C(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py
new file mode 100644
index 0000000..ba0e697
--- /dev/null
+++ b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py
@@ -0,0 +1,22 @@
+class A(object):
+    pass
+
+
+# comment
+def one():
+    pass
+
+
+# comment
+def two():
+    pass
+
+
+# comment
+class B(object):
+    pass
+
+
+# comment
+class C(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/formatter/wrapBeforeElse_after.py b/python/testData/formatter/wrapBeforeElse_after.py
index 216c191..b818506 100644
--- a/python/testData/formatter/wrapBeforeElse_after.py
+++ b/python/testData/formatter/wrapBeforeElse_after.py
@@ -1,2 +1,2 @@
-id = 1 if looooooooooooooooooooooooong_vaaaaaaaaaaaaaaaar == 'loooooooooooooooong_vaaaaaaaaaaaaaaaaaaaaaaaaaalue' else list(
-    'foo')[0]
\ No newline at end of file
+id = 1 if looooooooooooooooooooooooong_vaaaaaaaaaaaaaaaar == 'loooooooooooooooong_vaaaaaaaaaaaaaaaaaaaaaaaaaalue' else \
+list('foo')[0]
\ No newline at end of file
diff --git a/python/testData/formatter/wrapImports.py b/python/testData/formatter/wrapImports.py
new file mode 100644
index 0000000..e5ab6b4
--- /dev/null
+++ b/python/testData/formatter/wrapImports.py
@@ -0,0 +1 @@
+from common.resources.health import URLHealthCheck, JSONURLHealthCheck, HealthHandler, HealthResult
\ No newline at end of file
diff --git a/python/testData/formatter/wrapImports_after.py b/python/testData/formatter/wrapImports_after.py
new file mode 100644
index 0000000..7a58d05
--- /dev/null
+++ b/python/testData/formatter/wrapImports_after.py
@@ -0,0 +1,2 @@
+from common.resources.health import URLHealthCheck, JSONURLHealthCheck, \
+    HealthHandler, HealthResult
\ No newline at end of file
diff --git a/python/testData/formatter/wrapOnDot.py b/python/testData/formatter/wrapOnDot.py
new file mode 100644
index 0000000..917ec74
--- /dev/null
+++ b/python/testData/formatter/wrapOnDot.py
@@ -0,0 +1,2 @@
+sitesettings = call(settings_manager
+.get_whitelabel_settings_by_site_id(myuser.site_id))
\ No newline at end of file
diff --git a/python/testData/formatter/wrapOnDot_after.py b/python/testData/formatter/wrapOnDot_after.py
new file mode 100644
index 0000000..e42d177
--- /dev/null
+++ b/python/testData/formatter/wrapOnDot_after.py
@@ -0,0 +1,2 @@
+sitesettings = call(settings_manager
+                    .get_whitelabel_settings_by_site_id(myuser.site_id))
\ No newline at end of file
diff --git a/python/testData/highlighting/assignmentTargetWith.py b/python/testData/highlighting/assignmentTargetWith.py
index f516b41..f1e6493 100644
--- a/python/testData/highlighting/assignmentTargetWith.py
+++ b/python/testData/highlighting/assignmentTargetWith.py
@@ -1,2 +1,2 @@
-with open("") as <error descr="can't assign to operator">my_<<var</error>:
+with open("") as <error descr="Can't assign to operator">my_<<var</error>:
     pass
\ No newline at end of file
diff --git a/python/testData/highlighting/assignmentTargets.py b/python/testData/highlighting/assignmentTargets.py
index 731541d..295cd8f 100644
--- a/python/testData/highlighting/assignmentTargets.py
+++ b/python/testData/highlighting/assignmentTargets.py
@@ -1,31 +1,31 @@
 # fail
 
-<error descr="can't assign to function call">int(1)</error> = 1
+<error descr="Can't assign to function call">int(1)</error> = 1
 
-<error descr="can't assign to literal">12</error> = 1
+<error descr="Can't assign to literal">12</error> = 1
 
-<error descr="can't assign to operator">1 + 21</error> = 12
+<error descr="Can't assign to operator">1 + 21</error> = 12
 
-result = <error descr="can't assign to operator">a < c and c</error> = 4
+result = <error descr="Can't assign to operator">a < c and c</error> = 4
 
-<error descr="can't assign to ()">()</error> = 123
-<error descr="can't assign to []">[]</error> = 1
-[<error descr="can't assign to literal">1</error>] = 1
-<error descr="can't assign to literal">{}</error> = 1
-<error descr="can't assign to literal">{1, 2, 3}</error> = 1
+<error descr="Can't assign to ()">()</error> = 123
+<error descr="Can't assign to []">[]</error> = 1
+[<error descr="Can't assign to literal">1</error>] = 1
+<error descr="Can't assign to literal">{}</error> = 1
+<error descr="Can't assign to literal">{1, 2, 3}</error> = 1
 
-(<error descr="can't assign to literal">1</error>,(<error descr="can't assign to literal">2</error>, <error descr="can't assign to literal">3</error>)) = 3,(4,5)
-del <error descr="can't delete literal">1</error>
-del <error descr="can't delete function call">int()</error>
+(<error descr="Can't assign to literal">1</error>,(<error descr="Can't assign to literal">2</error>, <error descr="Can't assign to literal">3</error>)) = 3,(4,5)
+del <error descr="Can't delete literal">1</error>
+del <error descr="Can't delete function call">int()</error>
 
-for <error descr="can't assign to literal">1</error> in []:
+for <error descr="Can't assign to literal">1</error> in []:
   pass
 
-for (<error descr="can't assign to literal">1</error>,(<error descr="can't assign to literal">2</error>,)) in [12]:
+for (<error descr="Can't assign to literal">1</error>,(<error descr="Can't assign to literal">2</error>,)) in [12]:
   pass
 
-<error descr="augmented assign to dict comprehension not possible">{ x: y for y, x in ((1, 2), (3, 4)) }</error> += 5
-<error descr="can't assign to set comprehension">{ x for x in (1, 2) }</error> = 5
+<error descr="Augmented assign to dict comprehension not possible">{ x: y for y, x in ((1, 2), (3, 4)) }</error> += 5
+<error descr="Can't assign to set comprehension">{ x for x in (1, 2) }</error> = 5
 
 # ok
 
diff --git a/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_bar/__init__.py b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_bar/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_bar/__init__.py
diff --git a/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_baz.txt b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_baz.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_baz.txt
diff --git a/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_foo.py b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_foo.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/indexing/ModuleNameIndex/ModuleNameIndex_foo.py
diff --git a/python/testData/indexing/ModuleNameIndex/a.py b/python/testData/indexing/ModuleNameIndex/a.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/indexing/ModuleNameIndex/a.py
diff --git a/python/testData/inspections/AddCallSuperAnnotations.py b/python/testData/inspections/AddCallSuperAnnotations.py
new file mode 100644
index 0000000..b50ae1b
--- /dev/null
+++ b/python/testData/inspections/AddCallSuperAnnotations.py
@@ -0,0 +1,8 @@
+class Example1:
+    def __init__(self, field1: str):
+        self.field1 = field1
+
+
+class Example2(Example1):
+    def <warning descr="Call to __init__ of super class is missed">__i<caret>nit__</warning>(self):  ## Missed call to __init__ of super class
+        pass
\ No newline at end of file
diff --git a/python/testData/inspections/AddCallSuperAnnotations_after.py b/python/testData/inspections/AddCallSuperAnnotations_after.py
new file mode 100644
index 0000000..4bfd08c
--- /dev/null
+++ b/python/testData/inspections/AddCallSuperAnnotations_after.py
@@ -0,0 +1,8 @@
+class Example1:
+    def __init__(self, field1: str):
+        self.field1 = field1
+
+
+class Example2(Example1):
+    def __init__(self, field1):
+        super().__init__(field1)
\ No newline at end of file
diff --git a/python/testData/inspections/DictComprehensionToCall.py b/python/testData/inspections/DictComprehensionToCall.py
new file mode 100644
index 0000000..b360be7
--- /dev/null
+++ b/python/testData/inspections/DictComprehensionToCall.py
@@ -0,0 +1 @@
+var = <warning descr="Python version 2.4, 2.5, 2.6, 3.0 do not support dictionary comprehensions">{k: v for k, v in zip('abc', <caret>range(3)) if k % 2}</warning>
\ No newline at end of file
diff --git a/python/testData/inspections/DictComprehensionToCall_after.py b/python/testData/inspections/DictComprehensionToCall_after.py
new file mode 100644
index 0000000..a71f9ff
--- /dev/null
+++ b/python/testData/inspections/DictComprehensionToCall_after.py
@@ -0,0 +1 @@
+var = dict([(k, v) for k, v in zip('abc', range(3)) if k % 2])
\ No newline at end of file
diff --git a/python/testData/inspections/FieldFromUnusedParameterKeyword.py b/python/testData/inspections/FieldFromUnusedParameterKeyword.py
deleted file mode 100644
index 35851f0..0000000
--- a/python/testData/inspections/FieldFromUnusedParameterKeyword.py
+++ /dev/null
@@ -1,3 +0,0 @@
-class A:
-    def __init__(self, <weak_warning descr="Parameter 'foo' value is not used">f<caret>oo=True</weak_warning>):
-        print('hello')
\ No newline at end of file
diff --git a/python/testData/inspections/MoveDocstring.py b/python/testData/inspections/MoveDocstring.py
deleted file mode 100644
index 1db4e3f..0000000
--- a/python/testData/inspections/MoveDocstring.py
+++ /dev/null
@@ -1,8 +0,0 @@
-class GetCustomerPaymentProfileRequest(CustomerRequest):
-  def __init__(self, user, profileid):
-    CustomerRequest.__init__(self, user,
-                             customerPaymentProfileId=profileid)
-  <warning descr="Docstring seems to be misplaced">"""
-  Gets a payment profile by user <caret>Account object and authorize.net
-  profileid of the payment profile.
-  """</warning>
diff --git a/python/testData/inspections/MoveDocstring_after.py b/python/testData/inspections/MoveDocstring_after.py
deleted file mode 100644
index 1833c32..0000000
--- a/python/testData/inspections/MoveDocstring_after.py
+++ /dev/null
@@ -1,9 +0,0 @@
-class GetCustomerPaymentProfileRequest(CustomerRequest):
-  """
-  Gets a payment profile by user Account object and authorize.net
-  profileid of the payment profile.
-  """
-
-  def __init__(self, user, profileid):
-    CustomerRequest.__init__(self, user,
-                             customerPaymentProfileId=profileid)
diff --git a/python/testData/inspections/PyArgumentEqualDefaultInspection/test.py b/python/testData/inspections/PyArgumentEqualDefaultInspection/test.py
index bda25d3..b75341f 100644
--- a/python/testData/inspections/PyArgumentEqualDefaultInspection/test.py
+++ b/python/testData/inspections/PyArgumentEqualDefaultInspection/test.py
@@ -67,3 +67,9 @@
 
 {1: 2}.get('foo', None) #pass
 {1: 2}.pop('foo', None) #pass
+
+def a(foo=1*1024):
+    print foo
+
+a( 1024*1024)
+
diff --git a/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py b/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py
new file mode 100644
index 0000000..07e9942
--- /dev/null
+++ b/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py
@@ -0,0 +1,7 @@
+
+def deco(func, *args):
+    return func
+
+@deco  # <= Here is a false positive.
+def myfunc(a, b):
+    print(a, b)
\ No newline at end of file
diff --git a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
new file mode 100644
index 0000000..c6492c1
--- /dev/null
+++ b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/bad.py
@@ -0,0 +1,62 @@
+i = []
+for i[0] in xrange(5):
+    for <weak_warning descr="Variable 'i[0]' already declared in 'for' loop or 'with' statement above">i[0]</weak_warning> in xrange(20, 25):
+        print("Inner", i)
+        for <weak_warning descr="Variable 'i' already declared in 'for' loop or 'with' statement above">i</weak_warning> in xrange(20, 25):
+            pass
+    print("Outer", i)
+
+for i in xrange(5):
+    for <weak_warning descr="Variable 'i' already declared in 'for' loop or 'with' statement above">i</weak_warning> in xrange(20, 25):
+        print("Inner", i)
+    print("Outer", i)
+
+for i in xrange(5):
+    i = []
+    for <weak_warning descr="Variable 'i[0]' already declared in 'for' loop or 'with' statement above">i[0]</weak_warning> in xrange(20, 25):
+        print("Inner", i)
+    print("Outer", i)
+
+i = [0]
+for i[0] in xrange(5):
+    for <weak_warning descr="Variable 'i[0]' already declared in 'for' loop or 'with' statement above">i[0]</weak_warning> in xrange(20, 25):
+        print("Inner", i)
+    print("Outer", i)
+
+i = [[]]
+for i[0] in xrange(5):
+    for <weak_warning descr="Variable 'i' already declared in 'for' loop or 'with' statement above">i</weak_warning> in xrange(20, 25):
+        print("Inner", i)
+    print("Outer", i)
+
+with open("a") as f:
+    spam(f)
+    f.eggs()
+    with open("b") as <weak_warning descr="Variable 'f' already declared in 'for' loop or 'with' statement above">f</weak_warning>: #
+        pass
+
+with open("a") as z, open("A") as f:
+    spam(f)
+    f.eggs()
+    for (a,b,c,d,(e,<weak_warning descr="Variable 'f' already declared in 'for' loop or 'with' statement above">f</weak_warning>)) in []:
+        pass
+
+
+with open("a") as f:
+    spam(f)
+    f.eggs()
+    for z in []:
+        with open("b") as q:
+            with open("a") as <weak_warning descr="Variable 'f' already declared in 'for' loop or 'with' statement above">f</weak_warning>: #
+                pass
+
+
+class Foo(object):
+    def __init__(self):
+        super(Foo, self).__init__()
+        self.data = "ddd"
+
+    def foo(self):
+        for self.data in [1,2,3]:
+            for <weak_warning descr="Variable 'self.data' already declared in 'for' loop or 'with' statement above">self.data</weak_warning> in [1,2,3]:
+                pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
new file mode 100644
index 0000000..f324656
--- /dev/null
+++ b/python/testData/inspections/PyAssignmentToLoopOrWithParameterInspection/good.py
@@ -0,0 +1,89 @@
+from spam import eggs
+
+for eggs in (1, 12):
+    eggs = 12
+
+for a in (1, 12):
+    for b in (2, 24):
+        for (c, d) in {"C": "D"}.items():
+            (e, f) = (a, d)
+
+i = 12
+print(i)
+(z, x) = (i, 12)
+print(z)
+
+for root in settings.STATICFILES_DIRS:
+    if isinstance(root, (list, tuple)):
+        prefix, root = root
+
+
+for field, model in self.model._meta.get_concrete_fields_with_model():
+    if model is None:
+        model = self.model
+
+with open('a', 'w') as a, open('b', 'w') as b:
+    do_something()
+
+
+for f in [1,2,3]:
+    f = f + 1
+
+for f in [1,2,3]:
+    f = spam(f)
+
+for f in [1,2,3]:
+    f = eggs(lambda x: x + f)
+
+q = []
+for q[0] in [1,2,3]:
+    q[0] = eggs(q)
+
+q = []
+for q[0] in [1,2,3]:
+    q[0] = eggs(q)
+
+for f in [1,2,3]:
+    f = eggs(lambda x: x, f)
+
+for a in [1,2]:
+    pass
+
+for a in [1,2]:
+    pass
+
+b = 12
+for b in [1,2]:
+    pass
+
+for item in range(5):
+    want_to_import = False
+    print want_to_import
+    want_to_import = 2          #No error should be here
+    if True:
+        pass
+
+for ((a, b), (c, d)) in {(1, 2): (3, 4)}.items():
+    print b
+
+x = [1]
+for x[0] in range(1,2):
+    print i
+
+for x[i] in range(1,2):
+    print i
+
+x = [[1]]
+for x[0][0] in range(1,2):
+    x[0][1] = 1
+
+class Foo(object):
+    def __init__(self):
+        super(Foo, self).__init__()
+        self.data = "ddd"
+
+    def foo(self):
+        data, self.data = self.data
+        for data in [1,2,3]:
+            for self.data in [1,2,3]:
+                pass
diff --git a/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py b/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py
new file mode 100644
index 0000000..b593c51
--- /dev/null
+++ b/python/testData/inspections/PyAttributeOutsideInitInspection/staticMethod.py
@@ -0,0 +1,6 @@
+
+class C(object):
+
+    @staticmethod
+    def static_method(obj, name):
+        obj.name = name  # warning here
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py b/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
index 42338d8..d9c7e85 100644
--- a/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/binaryExpression.py
@@ -1,4 +1,4 @@
-print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> b</warning>)
+print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>)
 
-if <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> 2</warning>:
+if <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> 2</warning>:
     var = a
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/callExpression.py b/python/testData/inspections/PyCompatibilityInspection/callExpression.py
index 7327d8e..68afd5a 100644
--- a/python/testData/inspections/PyCompatibilityInspection/callExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/callExpression.py
@@ -2,11 +2,11 @@
     def __init__(self):
         <warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not support this syntax. super() should have arguments in Python 2">super()</warning>
 
-<warning descr="Python version 3.1, 3.2, 3.3 do not have method cmp">cmp()</warning>
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method reduce">reduce()</warning>
+<warning descr="Python version 3.1, 3.2, 3.3, 3.4 do not have method cmp">cmp()</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method reduce">reduce()</warning>
 <warning descr="Python version 2.4 does not have method all">all()</warning>
 
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have method buffer">buffer()</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have method buffer">buffer()</warning>
 
 def foo(a,b,c):
     print (a,b,c)
diff --git a/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py b/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
index 0dde8c7..8f113c7 100644
--- a/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
+++ b/python/testData/inspections/PyCompatibilityInspection/exceptBlock.py
@@ -5,5 +5,5 @@
 
 try:
     do_smth()
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">except ImportError, ImportWarning:
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">except ImportError, ImportWarning:
     do()</warning>
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py b/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
index b3be372..15a869f 100644
--- a/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/fromImportStatement.py
@@ -1,7 +1,7 @@
 <warning descr="Python version 2.4 doesn't support this syntax.">from . import smth</warning>
 <warning descr="Python version 2.4 doesn't support this syntax.">from .module import name1, name2</warning>
 
-from <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning> import BastionClass
+from <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning> import BastionClass
 
 <warning descr="Python version 2.4 doesn't support this syntax.">from . import exceptions</warning>
 
diff --git a/python/testData/inspections/PyCompatibilityInspection/importElement.py b/python/testData/inspections/PyCompatibilityInspection/importElement.py
index ccf562b..5927f38 100644
--- a/python/testData/inspections/PyCompatibilityInspection/importElement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/importElement.py
@@ -1 +1 @@
-import <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module Bastion">Bastion</warning>
\ No newline at end of file
+import <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module Bastion">Bastion</warning>
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/importStatement.py b/python/testData/inspections/PyCompatibilityInspection/importStatement.py
index c72f918..7e08386 100644
--- a/python/testData/inspections/PyCompatibilityInspection/importStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/importStatement.py
@@ -1,3 +1,3 @@
 <error descr="Python version 2.7 does not have module builtins"><warning descr="Python version 2.4, 2.5, 2.6, 2.7 do not have module builtins">import builtins</warning></error>
 
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not have module __builtin__">import __builtin__</warning>
\ No newline at end of file
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not have module __builtin__">import __builtin__</warning>
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py b/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
index 34e65db..3891ea0 100644
--- a/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/listCompExpression.py
@@ -1 +1 @@
-var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax in list comprehensions.">1, 2, 3</warning>]
\ No newline at end of file
+var = [x for x in <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax in list comprehensions.">1, 2, 3</warning>]
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py b/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
index dacb742..216ed0a 100644
--- a/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/numericLiteralExpression.py
@@ -1,2 +1,2 @@
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a trailing 'l' or 'L'.">12l</warning>
-v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>
\ No newline at end of file
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a trailing 'l' or 'L'.">12l</warning>
+v = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. It requires '0o' prefix for octal literals">04</warning><error descr="End of statement expected">8</error>
\ No newline at end of file
diff --git a/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py b/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
index 3696e4a..e6f1569 100644
--- a/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
+++ b/python/testData/inspections/PyCompatibilityInspection/raiseStatement.py
@@ -1,6 +1,6 @@
 try:
     a
 except :
-    <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax.">raise ImportError, ImportWarning</warning>
+    <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax.">raise ImportError, ImportWarning</warning>
 
-<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
+<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning>
diff --git a/python/testData/inspections/PyCompatibilityInspection/reprExpression.py b/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
index a4c606d..1b31464 100644
--- a/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/reprExpression.py
@@ -1 +1 @@
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support backquotes, use repr() instead">`imp.acquire_lock()`</warning>
diff --git a/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py b/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
index 1f7dd87..9a882a3 100644
--- a/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
+++ b/python/testData/inspections/PyCompatibilityInspection/stringLiteralExpression.py
@@ -23,7 +23,7 @@
 
 a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
 a = r""
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
 a = <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
 a = <warning descr="Python version 2.4, 2.5, 3.0 do not support a 'BR' prefix">br</warning>""
 
@@ -31,12 +31,12 @@
 
 a = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>""
 a = r""
-a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support a 'UR' prefix">ur</warning>""
+a = <warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UR' prefix">ur</warning>""
 
 # combined
 b = <warning descr="Python version 3.0, 3.1, 3.2 do not support a 'U' prefix">u</warning>"" <warning descr="Python version 2.4, 2.5 do not support a 'B' prefix">b</warning>""
 
 # never was available
-a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'RR' prefix">rr</warning></error>""
-a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'BB' prefix">bb</warning></error>""
-a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 do not support a 'UU' prefix">uu</warning></error>""
\ No newline at end of file
+a = <error descr="Python version 2.7 does not support a 'RR' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'RR' prefix">rr</warning></error>""
+a = <error descr="Python version 2.7 does not support a 'BB' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'BB' prefix">bb</warning></error>""
+a = <error descr="Python version 2.7 does not support a 'UU' prefix"><warning descr="Python version 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 do not support a 'UU' prefix">uu</warning></error>""
\ No newline at end of file
diff --git a/python/testData/inspections/PyMethodMayBeStaticInspection/decorated.py b/python/testData/inspections/PyMethodMayBeStaticInspection/decorated.py
new file mode 100644
index 0000000..c16da1e
--- /dev/null
+++ b/python/testData/inspections/PyMethodMayBeStaticInspection/decorated.py
@@ -0,0 +1,15 @@
+def bar(f):
+    def wrapper(self, *args, **kwargs):
+        print('running {cls}.{method}'.format(cls=type(self).__name__,
+                                              method=f.__name__))
+        return f(self, *args, **kwargs)
+    return wrapper
+
+
+class C(object):
+    @bar
+    def foo(self):  # False positive: self is used by @bar
+        return 'foo'
+
+
+C().foo()
\ No newline at end of file
diff --git a/python/testData/inspections/PyPep8NamingInspection/globals.py b/python/testData/inspections/PyPep8NamingInspection/globals.py
new file mode 100644
index 0000000..c055acc
--- /dev/null
+++ b/python/testData/inspections/PyPep8NamingInspection/globals.py
@@ -0,0 +1,14 @@
+from contextlib import contextmanager
+
+MUST_REFRESH_CACHE = False
+
+
+@contextmanager
+def fresh_per_request_cache():
+    global MUST_REFRESH_CACHE
+    orig = MUST_REFRESH_CACHE
+    MUST_REFRESH_CACHE = True
+    try:
+        yield
+    finally:
+        MUST_REFRESH_CACHE = orig
\ No newline at end of file
diff --git a/python/testData/inspections/PyPep8NamingInspection/importCamelAsLower.py b/python/testData/inspections/PyPep8NamingInspection/importCamelAsLower.py
index 94a1139..77c27c7 100644
--- a/python/testData/inspections/PyPep8NamingInspection/importCamelAsLower.py
+++ b/python/testData/inspections/PyPep8NamingInspection/importCamelAsLower.py
@@ -1 +1,2 @@
 from x import TestX as <weak_warning descr="CamelCase variable imported as lowercase">test</weak_warning>
+import Exceptions.tt as user_defined_properties
diff --git a/python/testData/inspections/PyPropertyAccessInspection/test.py b/python/testData/inspections/PyPropertyAccessInspection/test.py
index a42b78f..c140b8a 100644
--- a/python/testData/inspections/PyPropertyAccessInspection/test.py
+++ b/python/testData/inspections/PyPropertyAccessInspection/test.py
@@ -22,7 +22,7 @@
 
 <warning descr="Property 'readonly' cannot be set">a.readonly</warning> += 1
 del <warning descr="Property 'readonly' cannot be deleted">a.readonly</warning>
-del <error descr="can't delete function call">a.readonly()</error> # Error, delete the result of function
+del <error descr="Can't delete function call">a.readonly()</error> # Error, delete the result of function
 
 a.writeonly = 1
 <warning descr="Property 'writeonly' cannot be read">a.writeonly</warning> += 1
diff --git a/python/testData/inspections/PyStatementEffectInspection/test.py b/python/testData/inspections/PyStatementEffectInspection/test.py
index 71ef96b..4a39946 100644
--- a/python/testData/inspections/PyStatementEffectInspection/test.py
+++ b/python/testData/inspections/PyStatementEffectInspection/test.py
@@ -6,7 +6,7 @@
 
 def bar():
   """a"""
-  <warning descr="Statement seems to have no effect">"a"</warning>
+  "a"
 
 [allpats.extend(patlist) for patlist in pats.values()]
 
@@ -30,11 +30,11 @@
 """@type: int"""
 
 foo()
-<warning descr="Statement seems to have no effect">"""fake docstring"""</warning>
+"""fake docstring"""
 
 def foo():
   y = 2
-  <warning descr="Docstring seems to be misplaced">"""fake docstring"""</warning>
+  """fake docstring"""
 
 # PY-10755
 def is_good(a):
diff --git a/python/testData/inspections/PyTypeCheckerInspection/DefaultTupleParameter.py b/python/testData/inspections/PyTypeCheckerInspection/DefaultTupleParameter.py
new file mode 100644
index 0000000..0e082e8
--- /dev/null
+++ b/python/testData/inspections/PyTypeCheckerInspection/DefaultTupleParameter.py
@@ -0,0 +1,5 @@
+def f(x=(), y=('foo', 'bar')):
+    pass
+
+
+f([1, 2, 3], ['foo'])
diff --git a/python/testData/inspections/PyTypeCheckerInspection/MetaClassIteration.py b/python/testData/inspections/PyTypeCheckerInspection/MetaClassIteration.py
new file mode 100644
index 0000000..0ec6926
--- /dev/null
+++ b/python/testData/inspections/PyTypeCheckerInspection/MetaClassIteration.py
@@ -0,0 +1,31 @@
+class M1(type):
+    def __iter__(self):
+        pass
+
+
+class M2(type):
+    pass
+
+
+class C1(object):
+    __metaclass__ = M1
+
+
+class C2(object):
+    __metaclass__ = M2
+
+
+class B1(C1):
+    pass
+
+
+for x in C1:
+    pass
+
+
+for y in <warning descr="Expected 'collections.Iterable', got 'C2' instead">C2</warning>:
+    pass
+
+
+for z in B1:
+    pass
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/FromPackageImportBuiltin/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/FromPackageImportBuiltin/a.py
index a66445c..8880a48 100644
--- a/python/testData/inspections/PyUnresolvedReferencesInspection/FromPackageImportBuiltin/a.py
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/FromPackageImportBuiltin/a.py
@@ -1 +1,3 @@
 from importSource import <error descr="Unresolved reference 'len'">len</error>
+
+len()
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/a.py
new file mode 100644
index 0000000..b0ad821
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/a.py
@@ -0,0 +1 @@
+<warning descr="Unused import statement">from my_module import <error descr="Unresolved reference 'eggs'">eggs</error></warning>
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/my_module.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/my_module.py
new file mode 100644
index 0000000..51d8ead
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImported/my_module.py
@@ -0,0 +1,2 @@
+def my_func():
+    pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/a.py
new file mode 100644
index 0000000..5e1c928
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/a.py
@@ -0,0 +1,2 @@
+<warning descr="Unused import statement">from my_module import <error descr="Unresolved reference 'eggs'">eggs</error></warning>
+<warning descr="Unused import statement">from my_module import <error descr="Unresolved reference 'eggs'">eggs</error></warning>
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/my_module.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/my_module.py
new file mode 100644
index 0000000..51d8ead
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedUnresolvedNameImportedSeveralTimes/my_module.py
@@ -0,0 +1,2 @@
+def my_func():
+    pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/a.py
new file mode 100644
index 0000000..767f9bf
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/a.py
@@ -0,0 +1,4 @@
+from my_package.my_module import <error descr="Unresolved reference 'eggs'">eggs</error>
+from my_package.my_module import <error descr="Unresolved reference 'eggs'">eggs</error>
+
+eggs()
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/__init__.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/__init__.py
new file mode 100644
index 0000000..a5f9f02
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/__init__.py
@@ -0,0 +1 @@
+__author__ = 'Ilya.Kazakevich'
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/my_module.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/my_module.py
new file mode 100644
index 0000000..51d8ead
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UsedUnresolvedNameImportedSeveralTimes/my_package/my_module.py
@@ -0,0 +1,2 @@
+def my_func():
+    pass
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py b/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
new file mode 100644
index 0000000..f7406de
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
@@ -0,0 +1,12 @@
+class C(object):
+    def __enter__(self):
+        return self
+
+
+class D(C):
+    def foo(self):
+        pass
+
+
+with D() as cm:
+    cm.foo()  # pass
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/importFunction.py b/python/testData/inspections/PyUnresolvedReferencesInspection/importFunction.py
index 2bfbaa3..75ddd5c 100644
--- a/python/testData/inspections/PyUnresolvedReferencesInspection/importFunction.py
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/importFunction.py
@@ -1 +1,3 @@
 import collections.<warning descr="No module named OrderedDict">OrderedDict</warning>
+
+collections.OrderedDict()
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py b/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py
new file mode 100644
index 0000000..1fec85f
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py
@@ -0,0 +1,10 @@
+
+class SomeClass(object):
+    """ Awesome class
+
+    @ivar someVar: great stuff
+    @type someVar: string
+    """
+
+    def __init__(self):
+        self.someVar = None
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py
new file mode 100644
index 0000000..79c56a0
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py
@@ -0,0 +1,13 @@
+class C(object):
+    def get_self(self):
+        return self
+
+
+class D(C):
+    def foo(self):
+        pass
+
+
+d = D()
+print(d.foo())
+print(d.get_self().foo())  # pass
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/unresolvedImport.py b/python/testData/inspections/PyUnresolvedReferencesInspection/unresolvedImport.py
index e96da63..91aae42 100644
--- a/python/testData/inspections/PyUnresolvedReferencesInspection/unresolvedImport.py
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/unresolvedImport.py
@@ -1 +1,3 @@
 import <error descr="No module named wurm">wurm</error>
+
+wurm()
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedModuleImported.py b/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedModuleImported.py
new file mode 100644
index 0000000..3351b1d
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedModuleImported.py
@@ -0,0 +1 @@
+<warning descr="Unused import statement">import <error descr="No module named spam">spam</error></warning>
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedPackageImported.py b/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedPackageImported.py
new file mode 100644
index 0000000..ba929a6
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection/unusedUnresolvedPackageImported.py
@@ -0,0 +1 @@
+<warning descr="Unused import statement">import <error descr="No module named spam">spam</error>.eggs</warning>
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py
new file mode 100644
index 0000000..9d4ffeb
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/a.py
@@ -0,0 +1,18 @@
+from enum import Enum
+
+
+class Color(Enum):
+    red = 1
+    green = 2
+    blue = 3
+
+
+print(Color.red.name, Color.red.name.upper())
+print(Color.red.name.<warning descr="Unresolved attribute reference 'foo' for class 'str'">foo</warning>)
+print(Color.red.value, Color.red.value.real)
+print(Color.red.value.<warning descr="Unresolved attribute reference 'foo' for class 'int'">foo</warning>)
+print(Color.red.<warning descr="Unresolved attribute reference 'foo' for class 'Color'">foo</warning>)
+
+
+print(Color.__members__.items())
+print(Color.__members__.<warning descr="Unresolved attribute reference 'foo' for class 'dict'">foo</warning>)
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/enum.py b/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/enum.py
new file mode 100644
index 0000000..368f85a
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection3K/EnumMemberAttributes/enum.py
@@ -0,0 +1,17 @@
+class EnumMeta(type):
+    """Fake Enum metaclass."""
+    @property
+    def __members__(cls):
+        return {}
+
+
+class Enum(object, metaclass=EnumMeta):
+    """Fake Enum class."""
+
+    @DynamicClassAttribute
+    def name(self):
+        return self._name_
+
+    @DynamicClassAttribute
+    def value(self):
+        return self._value_
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/a.py
new file mode 100644
index 0000000..bf0ee44
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/a.py
@@ -0,0 +1,5 @@
+from m1 import C
+
+c = C()
+print(C.foo(), C.<warning descr="Unresolved attribute reference 'bar' for class 'C'">bar</warning>())
+print(c.<warning descr="Unresolved attribute reference 'foo' for class 'C'">foo</warning>())
\ No newline at end of file
diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/m1.py b/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/m1.py
new file mode 100644
index 0000000..bd6222a
--- /dev/null
+++ b/python/testData/inspections/PyUnresolvedReferencesInspection3K/MetaclassStub/m1.py
@@ -0,0 +1,7 @@
+class M(type):
+    def foo(cls):
+        pass
+
+
+class C(metaclass=M):
+    pass
diff --git a/python/testData/inspections/PyUnusedLocalVariableInspection/test.py b/python/testData/inspections/PyUnusedLocalVariableInspection/test.py
index 5edffda..65913e2 100644
--- a/python/testData/inspections/PyUnusedLocalVariableInspection/test.py
+++ b/python/testData/inspections/PyUnusedLocalVariableInspection/test.py
@@ -303,3 +303,16 @@
         x = False #pass
         if c:
             x = True
+
+
+# PY-7527
+def test_unused_empty_init_parameter():
+    class C(object):
+        def __init__(self, <weak_warning descr="Parameter 'foo' value is not used">foo</weak_warning>):
+            pass
+
+        def f(self, bar):
+            pass
+
+    return C
+
diff --git a/python/testData/inspections/QualifyByImport_after.py b/python/testData/inspections/QualifyByImport_after.py
index 7718df7..aa433ef 100644
--- a/python/testData/inspections/QualifyByImport_after.py
+++ b/python/testData/inspections/QualifyByImport_after.py
@@ -1,3 +1,3 @@
 import QualifyByImportFoo
 
-QualifyByImportFoo.foo # must be qualified
+QualifyByImportFoo.foo  # must be qualified
diff --git a/python/testData/inspections/ReplaceNotEqOperator.py b/python/testData/inspections/ReplaceNotEqOperator.py
index 37a717d..790a765 100644
--- a/python/testData/inspections/ReplaceNotEqOperator.py
+++ b/python/testData/inspections/ReplaceNotEqOperator.py
@@ -1 +1 @@
-print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3 do not support <>, use != instead.">a <> <caret>b</warning>)
\ No newline at end of file
+print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a<caret> <> b</warning>)
\ No newline at end of file
diff --git a/python/testData/inspections/StatementEffectPrint.py b/python/testData/inspections/StatementEffectPrint.py
deleted file mode 100644
index 03aa115..0000000
--- a/python/testData/inspections/StatementEffectPrint.py
+++ /dev/null
@@ -1,3 +0,0 @@
-<warning descr="Statement seems to have no effect and can be replaced with function call to have effect">print</warning><error descr="End of statement expected"> </error>\
-   <warning descr="Statement seems to have no effect">"foo"</warning>
-a = 1
\ No newline at end of file
diff --git a/python/testData/inspections/StatementEffectPrint_after.py b/python/testData/inspections/StatementEffectPrint_after.py
deleted file mode 100644
index a06f471..0000000
--- a/python/testData/inspections/StatementEffectPrint_after.py
+++ /dev/null
@@ -1,2 +0,0 @@
-print("foo")
-a = 1
\ No newline at end of file
diff --git a/python/testData/inspections/UnresolvedRefNoCreateFunction.py b/python/testData/inspections/UnresolvedRefNoCreateFunction.py
new file mode 100644
index 0000000..ae313c0
--- /dev/null
+++ b/python/testData/inspections/UnresolvedRefNoCreateFunction.py
@@ -0,0 +1 @@
+<error descr="Unresolved reference 'my_ref'">my_<caret>ref</error>.do_smth(1, 2)
\ No newline at end of file
diff --git a/python/testData/inspections/spelling/ignoreEscapeSequence.py b/python/testData/inspections/spelling/ignoreEscapeSequence.py
index 3bd9965..95e8df4 100644
--- a/python/testData/inspections/spelling/ignoreEscapeSequence.py
+++ b/python/testData/inspections/spelling/ignoreEscapeSequence.py
@@ -1 +1,2 @@
-print "foo\nsomething"
\ No newline at end of file
+print "foo\nsomething"
+print """foo\n<TYPO descr="Typo: In word 'brbrbr'">brbrbr</TYPO>"""
diff --git a/python/testData/keywordCompletion/finallyInElse.after.py b/python/testData/keywordCompletion/finallyInElse.after.py
new file mode 100644
index 0000000..be2ee7a
--- /dev/null
+++ b/python/testData/keywordCompletion/finallyInElse.after.py
@@ -0,0 +1,8 @@
+def f():
+    try:
+        a = 1
+    except:
+        b = 1
+    else:
+        c = 1
+    finally:
\ No newline at end of file
diff --git a/python/testData/keywordCompletion/finallyInElse.py b/python/testData/keywordCompletion/finallyInElse.py
new file mode 100644
index 0000000..5f170c7
--- /dev/null
+++ b/python/testData/keywordCompletion/finallyInElse.py
@@ -0,0 +1,8 @@
+def f():
+    try:
+        a = 1
+    except:
+        b = 1
+    else:
+        c = 1
+        fin<caret>
\ No newline at end of file
diff --git a/python/testData/mover/innerIf.py b/python/testData/mover/innerIf.py
index 2faa0c9..b55e273 100644
--- a/python/testData/mover/innerIf.py
+++ b/python/testData/mover/innerIf.py
@@ -1,3 +1,3 @@
 if value is not None:
     if not False or value <= 2:
-        print "h<caret>ere"
\ No newline at end of file
+        print "h<caret>ere"
diff --git a/python/testData/mover/innerIf_afterUp.py b/python/testData/mover/innerIf_afterUp.py
index 6be6e6c..3bbbd1a6 100644
--- a/python/testData/mover/innerIf_afterUp.py
+++ b/python/testData/mover/innerIf_afterUp.py
@@ -1,4 +1,4 @@
 if value is not None:
     print "here"
     if not False or value <= 2:
-        pass
\ No newline at end of file
+        pass
diff --git a/python/testData/mover/insideDocComment.py b/python/testData/mover/insideDocComment.py
new file mode 100644
index 0000000..1f2b305
--- /dev/null
+++ b/python/testData/mover/insideDocComment.py
@@ -0,0 +1,7 @@
+def fcn(self, foo, bar):
+    """
+    :type <caret>foo: int
+    :type bar: str
+    """
+    self.foo = foo
+    self.bar = bar 
\ No newline at end of file
diff --git a/python/testData/mover/insideDocComment_afterDown.py b/python/testData/mover/insideDocComment_afterDown.py
new file mode 100644
index 0000000..83dbf61
--- /dev/null
+++ b/python/testData/mover/insideDocComment_afterDown.py
@@ -0,0 +1,7 @@
+def fcn(self, foo, bar):
+    """
+    :type bar: str
+    :type foo: int
+    """
+    self.foo = foo
+    self.bar = bar 
\ No newline at end of file
diff --git a/python/testData/mover/insideDocComment_afterUp.py b/python/testData/mover/insideDocComment_afterUp.py
new file mode 100644
index 0000000..fe14fa7
--- /dev/null
+++ b/python/testData/mover/insideDocComment_afterUp.py
@@ -0,0 +1,7 @@
+"""
+    :type foo: int
+    :type bar: str
+    """
+def fcn(self, foo, bar):
+    self.foo = foo
+    self.bar = bar 
\ No newline at end of file
diff --git a/python/testData/mover/multiCompound.py b/python/testData/mover/multiCompound.py
index e5c86a8..fc9c32e 100644
--- a/python/testData/mover/multiCompound.py
+++ b/python/testData/mover/multiCompound.py
@@ -1,3 +1,3 @@
 for item in range(1,
     3):
-    b = 2<caret>
\ No newline at end of file
+    b = 2<caret>
diff --git a/python/testData/mover/multiCompound_afterUp.py b/python/testData/mover/multiCompound_afterUp.py
index c4fd7de..be4e18f 100644
--- a/python/testData/mover/multiCompound_afterUp.py
+++ b/python/testData/mover/multiCompound_afterUp.py
@@ -1,4 +1,4 @@
 b = 2<caret>
 for item in range(1,
     3):
-    pass
\ No newline at end of file
+    pass
diff --git a/python/testData/mover/multiLineSelection10.py b/python/testData/mover/multiLineSelection10.py
index 1feb611..b0f261a 100644
--- a/python/testData/mover/multiLineSelection10.py
+++ b/python/testData/mover/multiLineSelection10.py
@@ -1,3 +1,3 @@
 if True:
  <caret><selection>   a = 2
-    b = 3</selection>
\ No newline at end of file
+    b = 3</selection>
diff --git a/python/testData/mover/multiLineSelection10_afterUp.py b/python/testData/mover/multiLineSelection10_afterUp.py
index c8820eb..8d273a3 100644
--- a/python/testData/mover/multiLineSelection10_afterUp.py
+++ b/python/testData/mover/multiLineSelection10_afterUp.py
@@ -1,4 +1,4 @@
 <caret><selection>a = 2
 b = 3</selection>
 if True:
-    pass
\ No newline at end of file
+    pass
diff --git a/python/testData/mover/nestedBlock.py b/python/testData/mover/nestedBlock.py
index af60068..77ca3c1 100644
--- a/python/testData/mover/nestedBlock.py
+++ b/python/testData/mover/nestedBlock.py
@@ -4,4 +4,4 @@
     else:
         for n in range(10):
 
-    <caret>        print(b)
\ No newline at end of file
+    <caret>        print(b)
diff --git a/python/testData/mover/oneLineCompoundOutside.py b/python/testData/mover/oneLineCompoundOutside.py
index 3f17b74..56e31b8 100644
--- a/python/testData/mover/oneLineCompoundOutside.py
+++ b/python/testData/mover/oneLineCompoundOutside.py
@@ -3,4 +3,4 @@
 elif other_condition:
     if another_one:
         if T<caret>rue: a = 1      # <- move statement up here
-        else: b = 2
\ No newline at end of file
+        else: b = 2
diff --git a/python/testData/mover/oneLineCompoundOutside_afterUp.py b/python/testData/mover/oneLineCompoundOutside_afterUp.py
index 21f2798..1f871fb 100644
--- a/python/testData/mover/oneLineCompoundOutside_afterUp.py
+++ b/python/testData/mover/oneLineCompoundOutside_afterUp.py
@@ -4,4 +4,4 @@
     if T<caret>rue: a = 1      # <- move statement up here
     else: b = 2
     if another_one:
-        pass
\ No newline at end of file
+        pass
diff --git a/python/testData/mover/upInNested.py b/python/testData/mover/upInNested.py
index 4e170cc..89cacaf 100644
--- a/python/testData/mover/upInNested.py
+++ b/python/testData/mover/upInNested.py
@@ -4,4 +4,4 @@
     except:
         print(zoo(0).foo(2))
 except:
-    zoo<caret>(3)
\ No newline at end of file
+    zoo<caret>(3)
diff --git a/python/testData/mover/upInNested_afterUp.py b/python/testData/mover/upInNested_afterUp.py
index 9b20d8e..cb5ecd8 100644
--- a/python/testData/mover/upInNested_afterUp.py
+++ b/python/testData/mover/upInNested_afterUp.py
@@ -5,4 +5,4 @@
         print(zoo(0).foo(2))
     zoo(3)
 except:
-    pass
\ No newline at end of file
+    pass
diff --git a/python/testData/optimizeImports/insertBlankLines.after.py b/python/testData/optimizeImports/insertBlankLines.after.py
index e3719e0..62bebf5 100644
--- a/python/testData/optimizeImports/insertBlankLines.after.py
+++ b/python/testData/optimizeImports/insertBlankLines.after.py
@@ -8,3 +8,4 @@
 
 sys.path
 datetime.datetime
+foo.bar()
\ No newline at end of file
diff --git a/python/testData/optimizeImports/insertBlankLines.py b/python/testData/optimizeImports/insertBlankLines.py
index 9e77f44..fcf075f 100644
--- a/python/testData/optimizeImports/insertBlankLines.py
+++ b/python/testData/optimizeImports/insertBlankLines.py
@@ -7,3 +7,4 @@
 
 sys.path
 datetime.datetime
+foo.bar()
\ No newline at end of file
diff --git a/python/testData/optimizeImports/order.after.py b/python/testData/optimizeImports/order.after.py
index e3719e0..62bebf5 100644
--- a/python/testData/optimizeImports/order.after.py
+++ b/python/testData/optimizeImports/order.after.py
@@ -8,3 +8,4 @@
 
 sys.path
 datetime.datetime
+foo.bar()
\ No newline at end of file
diff --git a/python/testData/optimizeImports/order.py b/python/testData/optimizeImports/order.py
index ad3147a..eaa3e27 100644
--- a/python/testData/optimizeImports/order.py
+++ b/python/testData/optimizeImports/order.py
@@ -6,3 +6,4 @@
 
 sys.path
 datetime.datetime
+foo.bar()
\ No newline at end of file
diff --git a/python/testData/optimizeImports/unresolved.after.py b/python/testData/optimizeImports/unresolved.after.py
index b014e1f..8b13789 100644
--- a/python/testData/optimizeImports/unresolved.after.py
+++ b/python/testData/optimizeImports/unresolved.after.py
@@ -1 +1 @@
-import xyzzy_shazam
+
diff --git a/python/testData/override/docstring.py b/python/testData/override/docstring.py
new file mode 100644
index 0000000..3670ee1
--- /dev/null
+++ b/python/testData/override/docstring.py
@@ -0,0 +1,9 @@
+class Abstract(object):
+
+  @abstractmethod
+  def foo(self, bar):
+    pass
+
+
+class Concrete(Abstract):
+  """The docstring."""
\ No newline at end of file
diff --git a/python/testData/override/docstring_after.py b/python/testData/override/docstring_after.py
new file mode 100644
index 0000000..a8b3696
--- /dev/null
+++ b/python/testData/override/docstring_after.py
@@ -0,0 +1,12 @@
+class Abstract(object):
+
+  @abstractmethod
+  def foo(self, bar):
+    pass
+
+
+class Concrete(Abstract):
+  """The docstring."""
+
+  def foo(self, bar):
+      <selection>super(Concrete, self).foo(bar)</selection>
\ No newline at end of file
diff --git a/python/testData/psi/BadDecoratorNotMethod.py b/python/testData/psi/BadDecoratorNotMethod.py
new file mode 100644
index 0000000..1e3b5e6
--- /dev/null
+++ b/python/testData/psi/BadDecoratorNotMethod.py
@@ -0,0 +1,4 @@
+class Foo(object):
+     @staticmethod
+            def bad_method(): #test
+                pass
\ No newline at end of file
diff --git a/python/testData/psi/BadDecoratorNotMethod.txt b/python/testData/psi/BadDecoratorNotMethod.txt
new file mode 100644
index 0000000..b2269d3
--- /dev/null
+++ b/python/testData/psi/BadDecoratorNotMethod.txt
@@ -0,0 +1,44 @@
+PyFile:BadDecoratorNotMethod.py
+  PyClass: Foo
+    PsiElement(Py:CLASS_KEYWORD)('class')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('Foo')
+    PyArgumentList
+      PsiElement(Py:LPAR)('(')
+      PyReferenceExpression: object
+        PsiElement(Py:IDENTIFIER)('object')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n     ')
+    PyStatementList
+      PyFunction('null')
+        PyDecoratorList
+          PyDecorator: @staticmethod
+            PsiElement(Py:AT)('@')
+            PyReferenceExpression: staticmethod
+              PsiElement(Py:IDENTIFIER)('staticmethod')
+            PyArgumentList
+              <empty list>
+        PsiErrorElement:'@' or 'def' expected
+          <empty list>
+        PsiWhiteSpace('\n            ')
+        PyParameterList
+          <empty list>
+        PyStatementList
+          <empty list>
+      PsiErrorElement:Unexpected indent
+        <empty list>
+      PyFunction('bad_method')
+        PsiElement(Py:DEF_KEYWORD)('def')
+        PsiWhiteSpace(' ')
+        PsiElement(Py:IDENTIFIER)('bad_method')
+        PyParameterList
+          PsiElement(Py:LPAR)('(')
+          PsiElement(Py:RPAR)(')')
+        PsiElement(Py:COLON)(':')
+        PsiWhiteSpace(' ')
+        PsiComment(Py:END_OF_LINE_COMMENT)('#test')
+        PsiWhiteSpace('\n                ')
+        PyStatementList
+          PyPassStatement
+            PsiElement(Py:PASS_KEYWORD)('pass')
\ No newline at end of file
diff --git a/python/testData/psi/BlockWithoutColon.py b/python/testData/psi/BlockWithoutColon.py
new file mode 100644
index 0000000..a71c318
--- /dev/null
+++ b/python/testData/psi/BlockWithoutColon.py
@@ -0,0 +1,5 @@
+def foo():
+    while True
+        x = 1
+    x = 2
+    return x
diff --git a/python/testData/psi/BlockWithoutColon.txt b/python/testData/psi/BlockWithoutColon.txt
new file mode 100644
index 0000000..abf54f4
--- /dev/null
+++ b/python/testData/psi/BlockWithoutColon.txt
@@ -0,0 +1,44 @@
+PyFile:BlockWithoutColon.py
+  PyFunction('foo')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('foo')
+    PyParameterList
+      PsiElement(Py:LPAR)('(')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n    ')
+    PyStatementList
+      PyWhileStatement
+        PyWhilePart
+          PsiElement(Py:WHILE_KEYWORD)('while')
+          PsiWhiteSpace(' ')
+          PyReferenceExpression: True
+            PsiElement(Py:IDENTIFIER)('True')
+          PsiErrorElement:Colon expected
+            <empty list>
+          PsiWhiteSpace('\n        ')
+          PyStatementList
+            PyAssignmentStatement
+              PyTargetExpression: x
+                PsiElement(Py:IDENTIFIER)('x')
+              PsiWhiteSpace(' ')
+              PsiElement(Py:EQ)('=')
+              PsiWhiteSpace(' ')
+              PyNumericLiteralExpression
+                PsiElement(Py:INTEGER_LITERAL)('1')
+      PsiWhiteSpace('\n    ')
+      PyAssignmentStatement
+        PyTargetExpression: x
+          PsiElement(Py:IDENTIFIER)('x')
+        PsiWhiteSpace(' ')
+        PsiElement(Py:EQ)('=')
+        PsiWhiteSpace(' ')
+        PyNumericLiteralExpression
+          PsiElement(Py:INTEGER_LITERAL)('2')
+      PsiWhiteSpace('\n    ')
+      PyReturnStatement
+        PsiElement(Py:RETURN_KEYWORD)('return')
+        PsiWhiteSpace(' ')
+        PyReferenceExpression: x
+          PsiElement(Py:IDENTIFIER)('x')
\ No newline at end of file
diff --git a/python/testData/psi/EmptyBlockInFunctionBeforeFunction.py b/python/testData/psi/EmptyBlockInFunctionBeforeFunction.py
new file mode 100644
index 0000000..5248b7d
--- /dev/null
+++ b/python/testData/psi/EmptyBlockInFunctionBeforeFunction.py
@@ -0,0 +1,6 @@
+def foo(xs):
+    for x in xs:
+
+
+def bar():
+    pass
diff --git a/python/testData/psi/EmptyBlockInFunctionBeforeFunction.txt b/python/testData/psi/EmptyBlockInFunctionBeforeFunction.txt
new file mode 100644
index 0000000..4ee3e5c
--- /dev/null
+++ b/python/testData/psi/EmptyBlockInFunctionBeforeFunction.txt
@@ -0,0 +1,41 @@
+PyFile:EmptyBlockInFunctionBeforeFunction.py
+  PyFunction('foo')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('foo')
+    PyParameterList
+      PsiElement(Py:LPAR)('(')
+      PyNamedParameter('xs')
+        PsiElement(Py:IDENTIFIER)('xs')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n    ')
+    PyStatementList
+      PyForStatement
+        PyForPart
+          PsiElement(Py:FOR_KEYWORD)('for')
+          PsiWhiteSpace(' ')
+          PyTargetExpression: x
+            PsiElement(Py:IDENTIFIER)('x')
+          PsiWhiteSpace(' ')
+          PsiElement(Py:IN_KEYWORD)('in')
+          PsiWhiteSpace(' ')
+          PyReferenceExpression: xs
+            PsiElement(Py:IDENTIFIER)('xs')
+          PsiElement(Py:COLON)(':')
+          PyStatementList
+            PsiErrorElement:Indent expected
+              <empty list>
+  PsiWhiteSpace('\n\n\n')
+  PyFunction('bar')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('bar')
+    PyParameterList
+      PsiElement(Py:LPAR)('(')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n    ')
+    PyStatementList
+      PyPassStatement
+        PsiElement(Py:PASS_KEYWORD)('pass')
\ No newline at end of file
diff --git a/python/testData/psi/IncompleteFor.txt b/python/testData/psi/IncompleteFor.txt
index 3b833e5..3aac386 100644
--- a/python/testData/psi/IncompleteFor.txt
+++ b/python/testData/psi/IncompleteFor.txt
@@ -23,7 +23,8 @@
           PsiErrorElement:Colon expected
             <empty list>
           PyStatementList
-            <empty list>
+            PsiErrorElement:Indent expected
+              <empty list>
   PsiWhiteSpace('\n\n')
   PyFunction('bar')
     PsiElement(Py:DEF_KEYWORD)('def')
diff --git a/python/testData/psi/IncompleteStatementList.txt b/python/testData/psi/IncompleteStatementList.txt
index 6924008..fb363aa 100644
--- a/python/testData/psi/IncompleteStatementList.txt
+++ b/python/testData/psi/IncompleteStatementList.txt
@@ -18,7 +18,8 @@
           PsiErrorElement:Colon expected
             <empty list>
           PyStatementList
-            <empty list>
+            PsiErrorElement:Indent expected
+              <empty list>
   PsiWhiteSpace('\n\n')
   PyFunction('bar')
     PsiElement(Py:DEF_KEYWORD)('def')
diff --git a/python/testData/psi/KeywordAsFunctionName.txt b/python/testData/psi/KeywordAsFunctionName.txt
index 473ba30..c995f92 100644
--- a/python/testData/psi/KeywordAsFunctionName.txt
+++ b/python/testData/psi/KeywordAsFunctionName.txt
@@ -2,7 +2,7 @@
   PyFunction('null')
     PsiElement(Py:DEF_KEYWORD)('def')
     PsiWhiteSpace(' ')
-    PsiErrorElement:function name expected
+    PsiErrorElement:Identifier expected
       PsiElement(Py:FROM_KEYWORD)('from')
     PyParameterList
       PsiElement(Py:LPAR)('(')
diff --git a/python/testData/psi/MissingParenInCall.txt b/python/testData/psi/MissingParenInCall.txt
index 57caa80..649a59b 100644
--- a/python/testData/psi/MissingParenInCall.txt
+++ b/python/testData/psi/MissingParenInCall.txt
@@ -27,10 +27,9 @@
               PsiErrorElement:expression expected
                 <empty list>
           PsiWhiteSpace('\n\n')
-          PsiErrorElement:Colon expected
-            <empty list>
           PyStatementList
-            <empty list>
+            PsiErrorElement:Indent expected
+              <empty list>
   PyFunction('clean')
     PsiElement(Py:DEF_KEYWORD)('def')
     PsiWhiteSpace(' ')
diff --git a/python/testData/psi/NotClosedBraceDict.py b/python/testData/psi/NotClosedBraceDict.py
new file mode 100644
index 0000000..9a72624
--- /dev/null
+++ b/python/testData/psi/NotClosedBraceDict.py
@@ -0,0 +1,3 @@
+a = {
+        'b': 'c',
+    ]
\ No newline at end of file
diff --git a/python/testData/psi/NotClosedBraceDict.txt b/python/testData/psi/NotClosedBraceDict.txt
new file mode 100644
index 0000000..1222ea3
--- /dev/null
+++ b/python/testData/psi/NotClosedBraceDict.txt
@@ -0,0 +1,24 @@
+PyFile:NotClosedBraceDict.py
+  PyAssignmentStatement
+    PyTargetExpression: a
+      PsiElement(Py:IDENTIFIER)('a')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:EQ)('=')
+    PsiWhiteSpace(' ')
+    PyDictLiteralExpression
+      PsiElement(Py:LBRACE)('{')
+      PsiWhiteSpace('\n        ')
+      PyKeyValueExpression
+        PyStringLiteralExpression: b
+          PsiElement(Py:SINGLE_QUOTED_STRING)(''b'')
+        PsiElement(Py:COLON)(':')
+        PsiWhiteSpace(' ')
+        PyStringLiteralExpression: c
+          PsiElement(Py:SINGLE_QUOTED_STRING)(''c'')
+      PsiElement(Py:COMMA)(',')
+      PsiErrorElement:'}' expected
+        <empty list>
+  PsiWhiteSpace('\n    ')
+  PsiElement(Py:RBRACKET)(']')
+  PsiErrorElement:Statement expected, found Py:RBRACKET
+    <empty list>
\ No newline at end of file
diff --git a/python/testData/psi/NotClosedBraceSet.py b/python/testData/psi/NotClosedBraceSet.py
new file mode 100644
index 0000000..71817f2
--- /dev/null
+++ b/python/testData/psi/NotClosedBraceSet.py
@@ -0,0 +1 @@
+a = {'b',]
\ No newline at end of file
diff --git a/python/testData/psi/NotClosedBraceSet.txt b/python/testData/psi/NotClosedBraceSet.txt
new file mode 100644
index 0000000..95b97f0
--- /dev/null
+++ b/python/testData/psi/NotClosedBraceSet.txt
@@ -0,0 +1,17 @@
+PyFile:NotClosedBraceSet.py
+  PyAssignmentStatement
+    PyTargetExpression: a
+      PsiElement(Py:IDENTIFIER)('a')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:EQ)('=')
+    PsiWhiteSpace(' ')
+    PySetLiteralExpression
+      PsiElement(Py:LBRACE)('{')
+      PyStringLiteralExpression: b
+        PsiElement(Py:SINGLE_QUOTED_STRING)(''b'')
+      PsiElement(Py:COMMA)(',')
+      PsiErrorElement:'}' expected
+        <empty list>
+  PsiElement(Py:RBRACKET)(']')
+  PsiErrorElement:Statement expected, found Py:RBRACKET
+    <empty list>
\ No newline at end of file
diff --git a/python/testData/psi/OverIndentedComment.py b/python/testData/psi/OverIndentedComment.py
new file mode 100644
index 0000000..33e9351
--- /dev/null
+++ b/python/testData/psi/OverIndentedComment.py
@@ -0,0 +1,3 @@
+if test:
+        # comment
+    pass
diff --git a/python/testData/psi/OverIndentedComment.txt b/python/testData/psi/OverIndentedComment.txt
new file mode 100644
index 0000000..c098016
--- /dev/null
+++ b/python/testData/psi/OverIndentedComment.txt
@@ -0,0 +1,14 @@
+PyFile:OverIndentedComment.py
+  PyIfStatement
+    PyIfPartIf
+      PsiElement(Py:IF_KEYWORD)('if')
+      PsiWhiteSpace(' ')
+      PyReferenceExpression: test
+        PsiElement(Py:IDENTIFIER)('test')
+      PsiElement(Py:COLON)(':')
+      PsiWhiteSpace('\n        ')
+      PyStatementList
+        PsiComment(Py:END_OF_LINE_COMMENT)('# comment')
+        PsiWhiteSpace('\n    ')
+        PyPassStatement
+          PsiElement(Py:PASS_KEYWORD)('pass')
\ No newline at end of file
diff --git a/python/testData/psi/SingleClassBeforeFunction.py b/python/testData/psi/SingleClassBeforeFunction.py
new file mode 100644
index 0000000..b487baf
--- /dev/null
+++ b/python/testData/psi/SingleClassBeforeFunction.py
@@ -0,0 +1,5 @@
+class
+
+
+def foo():
+    pass
diff --git a/python/testData/psi/SingleClassBeforeFunction.txt b/python/testData/psi/SingleClassBeforeFunction.txt
new file mode 100644
index 0000000..2fa5b30
--- /dev/null
+++ b/python/testData/psi/SingleClassBeforeFunction.txt
@@ -0,0 +1,25 @@
+PyFile:SingleClassBeforeFunction.py
+  PyClass: null
+    PsiElement(Py:CLASS_KEYWORD)('class')
+    PsiErrorElement:Identifier expected
+      <empty list>
+    PyArgumentList
+      <empty list>
+    PsiErrorElement:Colon expected
+      <empty list>
+    PsiWhiteSpace('\n\n\n')
+    PyStatementList
+      PsiErrorElement:Indent expected
+        <empty list>
+  PyFunction('foo')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('foo')
+    PyParameterList
+      PsiElement(Py:LPAR)('(')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n    ')
+    PyStatementList
+      PyPassStatement
+        PsiElement(Py:PASS_KEYWORD)('pass')
diff --git a/python/testData/psi/SingleDefBeforeFunction.py b/python/testData/psi/SingleDefBeforeFunction.py
new file mode 100644
index 0000000..407918f
--- /dev/null
+++ b/python/testData/psi/SingleDefBeforeFunction.py
@@ -0,0 +1,5 @@
+def
+
+
+def bar():
+    x = 1
diff --git a/python/testData/psi/SingleDefBeforeFunction.txt b/python/testData/psi/SingleDefBeforeFunction.txt
new file mode 100644
index 0000000..5d4dfb0
--- /dev/null
+++ b/python/testData/psi/SingleDefBeforeFunction.txt
@@ -0,0 +1,31 @@
+PyFile:SingleDefBeforeFunction.py
+  PyFunction('null')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiErrorElement:Identifier expected
+      <empty list>
+    PsiErrorElement:'(' expected
+      <empty list>
+    PyParameterList
+      <empty list>
+    PsiWhiteSpace('\n\n\n')
+    PyStatementList
+      PsiErrorElement:Indent expected
+        <empty list>
+  PyFunction('bar')
+    PsiElement(Py:DEF_KEYWORD)('def')
+    PsiWhiteSpace(' ')
+    PsiElement(Py:IDENTIFIER)('bar')
+    PyParameterList
+      PsiElement(Py:LPAR)('(')
+      PsiElement(Py:RPAR)(')')
+    PsiElement(Py:COLON)(':')
+    PsiWhiteSpace('\n    ')
+    PyStatementList
+      PyAssignmentStatement
+        PyTargetExpression: x
+          PsiElement(Py:IDENTIFIER)('x')
+        PsiWhiteSpace(' ')
+        PsiElement(Py:EQ)('=')
+        PsiWhiteSpace(' ')
+        PyNumericLiteralExpression
+          PsiElement(Py:INTEGER_LITERAL)('1')
\ No newline at end of file
diff --git a/python/testData/psi/WithMissingID.txt b/python/testData/psi/WithMissingID.txt
index fa8caab..afd37e7 100644
--- a/python/testData/psi/WithMissingID.txt
+++ b/python/testData/psi/WithMissingID.txt
@@ -13,7 +13,7 @@
           PsiElement(Py:RPAR)(')')
       PsiWhiteSpace(' ')
       PsiElement(Py:AS_KEYWORD)('as')
-      PsiErrorElement:identifier expected
+      PsiErrorElement:Identifier expected
         <empty list>
     PsiWhiteSpace(' ')
     PsiElement(Py:COLON)(':')
diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py
index 6862903..7027a39 100644
--- a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py
+++ b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py
@@ -1,8 +1,7 @@
 class A:
   def __init__(self):
-    self.x = 1
     self.y = None
-
+    self.x = 1
 
 a = A()
 a.y+1
diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py
index 3ac2f7e..c0ce40f 100644
--- a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py
+++ b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py
@@ -1,7 +1,7 @@
 class A:
   def __init__(self):
-    self.x = 1
     self.y = None
+    self.x = 1
 
   def foo(self):
     a = self.y
diff --git a/python/testData/inspections/FieldFromUnusedParameter.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter.py
similarity index 100%
rename from python/testData/inspections/FieldFromUnusedParameter.py
rename to python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter.py
diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py
new file mode 100644
index 0000000..27f1600
--- /dev/null
+++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py
@@ -0,0 +1,3 @@
+class A:
+    def __init__(self, fo<caret>o=True):
+        print('hello')
\ No newline at end of file
diff --git a/python/testData/inspections/FieldFromUnusedParameterKeyword_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py
similarity index 98%
rename from python/testData/inspections/FieldFromUnusedParameterKeyword_after.py
rename to python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py
index 7e0d662..3f86fa4 100644
--- a/python/testData/inspections/FieldFromUnusedParameterKeyword_after.py
+++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py
@@ -1,4 +1,4 @@
 class A:
     def __init__(self, foo=True):
-        print('hello')
-        self.foo = foo
\ No newline at end of file
+        self.foo = foo
+        print('hello')
\ No newline at end of file
diff --git a/python/testData/inspections/FieldFromUnusedParameter_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py
similarity index 98%
rename from python/testData/inspections/FieldFromUnusedParameter_after.py
rename to python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py
index 7405ba3..58785ed 100644
--- a/python/testData/inspections/FieldFromUnusedParameter_after.py
+++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py
@@ -1,4 +1,4 @@
 class A:
     def __init__(self, foo):
-        print('hello')
-        self.foo = foo
\ No newline at end of file
+        self.foo = foo
+        print('hello')
\ No newline at end of file
diff --git a/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py b/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py
index 978acaf..5c47b58 100644
--- a/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py
+++ b/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py
@@ -8,6 +8,7 @@
     def y(self, param, a):
         pass
 
+
 # Some comment
 
 class B:
diff --git a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams.py b/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams.py
deleted file mode 100644
index 7cdd655..0000000
--- a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams.py
+++ /dev/null
@@ -1,10 +0,0 @@
-__author__ = 'ktisha'
-
-def foo(x):
-  return x
-
-class A():
-
-    @accepts(int, int)
-    def my_<caret>method(self):
-        print "Smth"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams_after.py b/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams_after.py
deleted file mode 100644
index 21293a9..0000000
--- a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/decoWithParams_after.py
+++ /dev/null
@@ -1,11 +0,0 @@
-__author__ = 'ktisha'
-
-def foo(x):
-  return x
-
-class A():
-
-    @staticmethod
-    @accepts(int, int)
-    def my_<caret>method():
-        print "Smth"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco.py b/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco.py
deleted file mode 100644
index dded2b0..0000000
--- a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco.py
+++ /dev/null
@@ -1,10 +0,0 @@
-__author__ = 'ktisha'
-
-def foo(x):
-  return x
-
-class A():
-
-    @my_deco
-    def my_<caret>method(self):
-        print "Smth"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco_after.py b/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco_after.py
deleted file mode 100644
index 36607a4..0000000
--- a/python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/functionWithDeco_after.py
+++ /dev/null
@@ -1,11 +0,0 @@
-__author__ = 'ktisha'
-
-def foo(x):
-  return x
-
-class A():
-
-    @staticmethod
-    @my_deco
-    def my_method():
-        print "Smth"
\ No newline at end of file
diff --git a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py
index da65a03..040de73 100644
--- a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py
+++ b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py
@@ -3,8 +3,8 @@
 
 class A:
     def __init__(self):
-        self._a = 1
         self.b = 1
+        self._a = 1
 
     def foo(self):
         pass
diff --git a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py
index 2dc8074..9a83f67 100644
--- a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py
+++ b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py
@@ -3,8 +3,8 @@
 
 class A:
     def __init__(self):
-        self._a = 1
         self.b = 1
+        self._a = 1
 
     def foo(self):
         c = 1
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.after.py b/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.after.py
new file mode 100644
index 0000000..7a9fbe9
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.after.py
@@ -0,0 +1,32 @@
+from stub import *
+import stub
+
+
+class MyOldClass(metaclass=ABCMeta):
+    pass
+
+
+class MyNewClass(object,metaclass=ABCMeta):
+    pass
+
+
+class MyNewClass_2(object, datetime,metaclass=ABCMeta):
+    pass
+
+class NewClass_3(stub.object,metaclass=ABCMeta):
+    pass
+
+class NewClass_4(stub.object, stub.datetime,metaclass=ABCMeta):
+    pass
+
+class NewClass_5(stub.datetime, foo=stub.object,metaclass=ABCMeta):
+    pass
+
+
+spam = "new_param"
+
+my_function(new_param=spam)
+my_function_1("some_param",new_param=spam)
+my_function_2(named_param="ham",new_param=spam)
+my_function_3("some_param", "some_param_2", named_param="ham",new_param=spam)
+my_function_4("some_param", "some_param_2", named_param=stub.object, named_param_2="eggs",new_param=spam)
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.py b/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.py
new file mode 100644
index 0000000..32b4fda
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addKeyArgument/addArgumentFile.py
@@ -0,0 +1,32 @@
+from stub import *
+import stub
+
+
+class MyOldClass():
+    pass
+
+
+class MyNewClass(object):
+    pass
+
+
+class MyNewClass_2(object, datetime):
+    pass
+
+class NewClass_3(stub.object):
+    pass
+
+class NewClass_4(stub.object, stub.datetime):
+    pass
+
+class NewClass_5(stub.datetime, foo=stub.object):
+    pass
+
+
+spam = "new_param"
+
+my_function()
+my_function_1("some_param")
+my_function_2(named_param="ham")
+my_function_3("some_param", "some_param_2", named_param="ham")
+my_function_4("some_param", "some_param_2", named_param=stub.object, named_param_2="eggs")
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addKeyArgument/stub.py b/python/testData/refactoring/argumentList/addKeyArgument/stub.py
new file mode 100644
index 0000000..9227a35
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addKeyArgument/stub.py
@@ -0,0 +1,13 @@
+class object: pass
+
+class datetime: pass
+
+
+class ABCMeta: pass
+
+
+def my_function(new_param="spam"): pass
+def my_function_1(first_param,some_param, new_param="spam"): pass
+def my_function_2(first_param,named_param="ham", new_param="spam"): pass
+def my_function_3(first_param,some_param, some_param_2, named_param="ham", new_param="spam"): pass
+def my_function_4(first_param,some_param, some_param_2, named_param="ham", named_param_2="eggs", new_param="spam"): pass
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addParam/addArgumentFile.after.py b/python/testData/refactoring/argumentList/addParam/addArgumentFile.after.py
new file mode 100644
index 0000000..97c18fd
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addParam/addArgumentFile.after.py
@@ -0,0 +1,27 @@
+from stub import *
+import stub
+
+
+class MyOldClass(SuperClass):
+    pass
+
+
+class MyNewClass(object,SuperClass):
+    pass
+
+
+class MyNewClass_2(object, datetime,SuperClass):
+    pass
+
+class NewClass_3(stub.object,SuperClass):
+    pass
+
+class NewClass_4(stub.object, stub.datetime,SuperClass):
+    pass
+
+new_param = "ogg"
+
+my_function(new_param,some_param="spam")
+my_function(new_param)
+my_function_2("some_param",new_param)
+my_function_3(new_param,some_param="spam",some_another_param=stub.object)
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addParam/addArgumentFile.py b/python/testData/refactoring/argumentList/addParam/addArgumentFile.py
new file mode 100644
index 0000000..32d0235
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addParam/addArgumentFile.py
@@ -0,0 +1,27 @@
+from stub import *
+import stub
+
+
+class MyOldClass():
+    pass
+
+
+class MyNewClass(object):
+    pass
+
+
+class MyNewClass_2(object, datetime):
+    pass
+
+class NewClass_3(stub.object):
+    pass
+
+class NewClass_4(stub.object, stub.datetime):
+    pass
+
+new_param = "ogg"
+
+my_function(some_param="spam")
+my_function()
+my_function_2("some_param")
+my_function_3(some_param="spam",some_another_param=stub.object)
\ No newline at end of file
diff --git a/python/testData/refactoring/argumentList/addParam/stub.py b/python/testData/refactoring/argumentList/addParam/stub.py
new file mode 100644
index 0000000..b98bdb0
--- /dev/null
+++ b/python/testData/refactoring/argumentList/addParam/stub.py
@@ -0,0 +1,13 @@
+class object: pass
+
+class datetime: pass
+
+
+class ABCMeta: pass
+
+class SuperClass: pass
+
+
+def my_function(new_param,some_param="spam"): pass
+def my_function_2(new_param,some_param): pass
+def my_function_3(new_param,some_param="spam",some_another_param="eggs"): pass
diff --git a/python/testData/refactoring/dependenciesTest.py b/python/testData/refactoring/dependenciesTest.py
new file mode 100644
index 0000000..aa245b2
--- /dev/null
+++ b/python/testData/refactoring/dependenciesTest.py
@@ -0,0 +1,9 @@
+class Foo:
+    """
+    Some doc
+    """
+
+    def my_method(self):
+        pass
+
+    CLASS_FIELD = 42
diff --git a/python/testData/refactoring/extractmethod/Comment2.after.py b/python/testData/refactoring/extractmethod/Comment2.after.py
index 1260973..c5cc3a7 100644
--- a/python/testData/refactoring/extractmethod/Comment2.after.py
+++ b/python/testData/refactoring/extractmethod/Comment2.after.py
@@ -1,6 +1,6 @@
 class Foo():
     def baz():
-        tmp = "!" #try to extract this assignmet, either with or without this comment
+        tmp = "!"  # try to extract this assignment, either with or without this comment
 
     baz()
 
diff --git a/python/testData/refactoring/extractmethod/Comment2.before.py b/python/testData/refactoring/extractmethod/Comment2.before.py
index d43386a..23ba13d 100644
--- a/python/testData/refactoring/extractmethod/Comment2.before.py
+++ b/python/testData/refactoring/extractmethod/Comment2.before.py
@@ -1,5 +1,5 @@
 class Foo():
-    <selection>tmp = "!" #try to extract this assignmet, either with or without this comment</selection>
+    <selection>tmp = "!" #try to extract this assignment, either with or without this comment</selection>
 
     def bar(self):
         pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractmethod/ElseBody.after.py b/python/testData/refactoring/extractmethod/ElseBody.after.py
index 684a444..24e387d 100644
--- a/python/testData/refactoring/extractmethod/ElseBody.after.py
+++ b/python/testData/refactoring/extractmethod/ElseBody.after.py
@@ -1,5 +1,5 @@
 def baz(f_new):
-    length = len(f_new.readlines()) #<---extract something from here
+    length = len(f_new.readlines())  # <---extract something from here
     print("hi from else")
 
 
diff --git a/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.after.py b/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.after.py
new file mode 100644
index 0000000..eba5f32
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.after.py
@@ -0,0 +1,9 @@
+import shared_module
+from shared_module import module_function as my_function, ModuleClass
+
+
+class NewParent(object):
+    def do_useful_stuff(self):
+        i = shared_module.MODULE_CONTANT
+        my_function()
+        ModuleClass()
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.py b/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importMultiFile/dest_module.py
diff --git a/python/testData/refactoring/extractsuperclass/importMultiFile/shared_module.py b/python/testData/refactoring/extractsuperclass/importMultiFile/shared_module.py
new file mode 100644
index 0000000..13fe833
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importMultiFile/shared_module.py
@@ -0,0 +1,9 @@
+MODULE_CONTANT = 42
+
+
+def module_function():
+    pass
+
+
+class ModuleClass(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.after.py b/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.after.py
new file mode 100644
index 0000000..b9d7117
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.after.py
@@ -0,0 +1,5 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.py b/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.py
new file mode 100644
index 0000000..aa10bca
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importMultiFile/source_module.py
@@ -0,0 +1,9 @@
+import shared_module
+from shared_module import module_function as my_function
+from shared_module import ModuleClass
+
+class MyClass(object):
+    def do_useful_stuff(self):
+        i = shared_module.MODULE_CONTANT
+        my_function()
+        ModuleClass()
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBroken.after.py b/python/testData/refactoring/extractsuperclass/importNotBroken.after.py
new file mode 100644
index 0000000..897c62a
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBroken.after.py
@@ -0,0 +1,9 @@
+from shared import SharedClass
+
+
+class DestClass(SharedClass):
+    pass
+
+
+class Source(DestClass):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBroken.before.py b/python/testData/refactoring/extractsuperclass/importNotBroken.before.py
new file mode 100644
index 0000000..82d6d5c
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBroken.before.py
@@ -0,0 +1,5 @@
+from shared import SharedClass
+
+
+class Source(SharedClass):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.after.py b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.after.py
new file mode 100644
index 0000000..6189ad4
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.after.py
@@ -0,0 +1,5 @@
+from shared_module import SharedClass
+
+
+class NewParent(SharedClass):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.py b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/dest_module.py
diff --git a/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/shared_module.py b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/shared_module.py
new file mode 100644
index 0000000..da81c49
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/shared_module.py
@@ -0,0 +1 @@
+class SharedClass(object): pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.after.py b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.after.py
new file mode 100644
index 0000000..b9d7117
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.after.py
@@ -0,0 +1,5 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.py b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.py
new file mode 100644
index 0000000..1824aec
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/importNotBrokenManyFiles/source_module.py
@@ -0,0 +1,4 @@
+from shared_module import SharedClass
+
+class MyClass(SharedClass):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.after.py b/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.after.py
new file mode 100644
index 0000000..ef3511d
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.after.py
@@ -0,0 +1,8 @@
+class Parent(object):
+    def __init__(self):
+        self.eggs = 12
+
+
+class Child(Parent):
+    def foo(self):
+        self.eggs = 12
diff --git a/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.before.py b/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.before.py
new file mode 100644
index 0000000..9c5594a
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/instanceNotDeclaredInInit.before.py
@@ -0,0 +1,3 @@
+class Child(object):
+    def foo(self):
+        self.eggs = 12
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/abc.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/abc.py
new file mode 100644
index 0000000..ef4f2f6
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/abc.py
@@ -0,0 +1,8 @@
+# Stubs
+
+class ABCMeta:
+    pass
+
+
+def abstractmethod(foo):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.after.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.after.py
new file mode 100644
index 0000000..bbf726c
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.after.py
@@ -0,0 +1,13 @@
+from abc import abstractmethod
+from abc import ABCMeta
+
+
+class NewParent(object):
+    __metaclass__ = ABCMeta
+
+    @abstractmethod
+    def foo_method(self):
+        """
+        Foo
+        """
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/dest_module.py
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/shared_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/shared_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/shared_module.py
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.after.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.after.py
new file mode 100644
index 0000000..6e71752
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.after.py
@@ -0,0 +1,9 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    def foo_method(self):
+        """
+        Foo
+        """
+        spam = "eggs"
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.py
new file mode 100644
index 0000000..f4a7c42
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstract/source_module.py
@@ -0,0 +1,6 @@
+class MyClass(object):
+    def foo_method(self):
+        """
+        Foo
+        """
+        spam = "eggs"
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/abc.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/abc.py
new file mode 100644
index 0000000..ef4f2f6
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/abc.py
@@ -0,0 +1,8 @@
+# Stubs
+
+class ABCMeta:
+    pass
+
+
+def abstractmethod(foo):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.after.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.after.py
new file mode 100644
index 0000000..ddce4a8
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.after.py
@@ -0,0 +1,13 @@
+from abc import ABCMeta
+from abc import abstractmethod
+
+
+ABCMeta()
+abstractmethod()
+
+
+class NewParent(metaclass=ABCMeta):
+    @classmethod
+    @abstractmethod
+    def foo_method(cls):
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.py
new file mode 100644
index 0000000..81549d3
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/dest_module.py
@@ -0,0 +1,6 @@
+from abc import ABCMeta
+from abc import abstractmethod
+
+
+ABCMeta()
+abstractmethod()
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/shared_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/shared_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/shared_module.py
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.after.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.after.py
new file mode 100644
index 0000000..02c129f
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.after.py
@@ -0,0 +1,7 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    @classmethod
+    def foo_method(cls):
+        spam = "eggs"
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.py b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.py
new file mode 100644
index 0000000..b197c5f
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveAndMakeAbstractImportExistsPy3/source_module.py
@@ -0,0 +1,4 @@
+class MyClass():
+    @classmethod
+    def foo_method(cls):
+        spam = "eggs"
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.after.py b/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.after.py
new file mode 100644
index 0000000..1171abf
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.after.py
@@ -0,0 +1,5 @@
+from shared_module import TheParentOfItAll
+
+
+class NewParent(TheParentOfItAll):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.py b/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtends/dest_module.py
diff --git a/python/testData/refactoring/extractsuperclass/moveExtends/shared_module.py b/python/testData/refactoring/extractsuperclass/moveExtends/shared_module.py
new file mode 100644
index 0000000..fd3d3fc
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtends/shared_module.py
@@ -0,0 +1,2 @@
+class TheParentOfItAll(object):
+  pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtends/source_module.after.py b/python/testData/refactoring/extractsuperclass/moveExtends/source_module.after.py
new file mode 100644
index 0000000..b9d7117
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtends/source_module.after.py
@@ -0,0 +1,5 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtends/source_module.py b/python/testData/refactoring/extractsuperclass/moveExtends/source_module.py
new file mode 100644
index 0000000..87c753a
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtends/source_module.py
@@ -0,0 +1,4 @@
+import shared_module
+
+class MyClass(shared_module.TheParentOfItAll):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.after.py b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.after.py
new file mode 100644
index 0000000..1171abf
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.after.py
@@ -0,0 +1,5 @@
+from shared_module import TheParentOfItAll
+
+
+class NewParent(TheParentOfItAll):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.py b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/dest_module.py
diff --git a/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/shared_module.py b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/shared_module.py
new file mode 100644
index 0000000..fd3d3fc
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/shared_module.py
@@ -0,0 +1,2 @@
+class TheParentOfItAll(object):
+  pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.after.py b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.after.py
new file mode 100644
index 0000000..b9d7117
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.after.py
@@ -0,0 +1,5 @@
+from dest_module import NewParent
+
+
+class MyClass(NewParent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.py b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.py
new file mode 100644
index 0000000..c2ca974
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.py
@@ -0,0 +1,4 @@
+from shared_module import TheParentOfItAll
+
+class MyClass(TheParentOfItAll):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveFields.after.py b/python/testData/refactoring/extractsuperclass/moveFields.after.py
new file mode 100644
index 0000000..043e4d3
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveFields.after.py
@@ -0,0 +1,10 @@
+class ToClass(object):
+    CLASS_FIELD = 42
+
+    def __init__(self):
+        self.instance_field = 100500
+
+
+class FromClass(ToClass):
+  def __init__(self):
+      pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/moveFields.before.py b/python/testData/refactoring/extractsuperclass/moveFields.before.py
new file mode 100644
index 0000000..54a167f
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/moveFields.before.py
@@ -0,0 +1,4 @@
+class FromClass(object):
+  CLASS_FIELD = 42
+  def __init__(self):
+    self.instance_field = 100500
diff --git a/python/testData/refactoring/extractsuperclass/presenter/file.py b/python/testData/refactoring/extractsuperclass/presenter/file.py
new file mode 100644
index 0000000..9e6af14
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/presenter/file.py
@@ -0,0 +1,20 @@
+from datetime import date
+class Child(object, date):
+    CLASS_VAR = "spam"
+
+    def eggs(self):  # May be abstract
+        pass
+
+    def __init__(self):
+        super(Child, self).__init__()
+        self.artur = "king"
+
+class StaticOnly(object):
+    @staticmethod
+    def static_method(): # May be abstract in case of Py3
+        pass
+
+
+class OldClass():
+    def foo(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/shared.py b/python/testData/refactoring/extractsuperclass/shared.py
new file mode 100644
index 0000000..71f03ab
--- /dev/null
+++ b/python/testData/refactoring/extractsuperclass/shared.py
@@ -0,0 +1 @@
+class SharedClass: pass
\ No newline at end of file
diff --git a/python/testData/refactoring/extractsuperclass/withImport.after.py b/python/testData/refactoring/extractsuperclass/withImport.after.py
index ccd508b..8601863 100644
--- a/python/testData/refactoring/extractsuperclass/withImport.after.py
+++ b/python/testData/refactoring/extractsuperclass/withImport.after.py
@@ -1,4 +1,3 @@
-import os
 from refactoring.extractsuperclass import Suppa
 
 
diff --git a/python/testData/refactoring/introduceField/py4437.after.py b/python/testData/refactoring/introduceField/py4437.after.py
index e9c7d75..07a1331 100644
--- a/python/testData/refactoring/introduceField/py4437.after.py
+++ b/python/testData/refactoring/introduceField/py4437.after.py
@@ -1,7 +1,7 @@
 class SomeClass():
     def __init__(self):
-        self.x = 1
         self.a = ''
+        self.x = 1
 
     def foo(self):
         self.a
diff --git a/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.after.py b/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.after.py
new file mode 100644
index 0000000..e85e0f2
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.after.py
@@ -0,0 +1,4 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        bar = foo
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.py b/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.py
new file mode 100644
index 0000000..e85e0f2
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodHasMeta/Class.py
@@ -0,0 +1,4 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        bar = foo
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.after.py b/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.after.py
new file mode 100644
index 0000000..b0004eb
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.after.py
@@ -0,0 +1,13 @@
+from abc import ABCMeta, abstractmethod
+
+
+class Parent(object):
+    __metaclass__ = ABCMeta
+
+    @abstractmethod
+    def my_method2(self):
+        pass
+
+    @abstractmethod
+    def my_method(self, foo):
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.py b/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.py
new file mode 100644
index 0000000..14d85de
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.py
@@ -0,0 +1,9 @@
+from abc import ABCMeta, abstractmethod
+
+
+class Parent(object):
+    __metaclass__ = ABCMeta
+
+    @abstractmethod
+    def my_method2(self):
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodHasMeta/abc.py b/python/testData/refactoring/pullup/abstractMethodHasMeta/abc.py
new file mode 100644
index 0000000..ef4f2f6
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodHasMeta/abc.py
@@ -0,0 +1,8 @@
+# Stubs
+
+class ABCMeta:
+    pass
+
+
+def abstractmethod(foo):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.after.py b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.after.py
new file mode 100644
index 0000000..69998c4
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.after.py
@@ -0,0 +1,7 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        bar = foo
+
+    def my_method_2(self, foo):
+            bar = foo
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.py b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.py
new file mode 100644
index 0000000..69998c4
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/Class.py
@@ -0,0 +1,7 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        bar = foo
+
+    def my_method_2(self, foo):
+            bar = foo
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.after.py b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.after.py
new file mode 100644
index 0000000..d44a9e4
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.after.py
@@ -0,0 +1,14 @@
+from abc import ABCMeta
+from abc import abstractmethod
+
+
+class Parent(object):
+    __metaclass__ = ABCMeta
+
+    @abstractmethod
+    def my_method(self, foo):
+        pass
+
+    @abstractmethod
+    def my_method_2(self, foo):
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.py b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.py
new file mode 100644
index 0000000..b63dd44
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/SuperClass.py
@@ -0,0 +1,2 @@
+class Parent(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/abc.py b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/abc.py
new file mode 100644
index 0000000..ef4f2f6
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy2AddMeta/abc.py
@@ -0,0 +1,8 @@
+# Stubs
+
+class ABCMeta:
+    pass
+
+
+def abstractmethod(foo):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.after.py b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.after.py
new file mode 100644
index 0000000..c0e75fa
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.after.py
@@ -0,0 +1,12 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        """
+        Eats eggs
+        :param foo: eggs
+        """
+        bar = foo
+
+    @classmethod
+    def my_class_method():
+        print("Q")
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.py b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.py
new file mode 100644
index 0000000..c0e75fa
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/Class.py
@@ -0,0 +1,12 @@
+from SuperClass import Parent
+class Child(Parent):
+    def my_method(self, foo):
+        """
+        Eats eggs
+        :param foo: eggs
+        """
+        bar = foo
+
+    @classmethod
+    def my_class_method():
+        print("Q")
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.after.py b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.after.py
new file mode 100644
index 0000000..ded9ea6
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.after.py
@@ -0,0 +1,16 @@
+from abc import ABCMeta
+from abc import abstractmethod
+from abc import object
+class Parent(object, metaclass=ABCMeta):
+    @abstractmethod
+    def my_method(self, foo):
+        """
+        Eats eggs
+        :param foo: eggs
+        """
+        pass
+
+    @classmethod
+    @abstractmethod
+    def my_class_method():
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.py b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.py
new file mode 100644
index 0000000..33ba9ff
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.py
@@ -0,0 +1,3 @@
+from abc import object
+class Parent(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/abc.py b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/abc.py
new file mode 100644
index 0000000..a63732d
--- /dev/null
+++ b/python/testData/refactoring/pullup/abstractMethodPy3AddMeta/abc.py
@@ -0,0 +1,11 @@
+# Stubs
+
+class object:
+    pass
+
+class ABCMeta:
+    pass
+
+
+def abstractmethod(foo):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/dependenciesOrder.after.py b/python/testData/refactoring/pullup/dependenciesOrder.after.py
new file mode 100644
index 0000000..151587a
--- /dev/null
+++ b/python/testData/refactoring/pullup/dependenciesOrder.after.py
@@ -0,0 +1,30 @@
+class DataHolder:
+    VAR = 1
+
+class Parent:
+    A_FIELD = DataHolder.VAR
+    CLASS_FIELD = 42
+    ANOTHER_CLASS_FIELD = CLASS_FIELD
+    BOO = 12
+    FIELD = BOO
+
+    def __init__(self):
+        self.d = Parent.BOO
+        self.c = 1
+        self.b = self.c
+
+    @staticmethod
+    def foo():
+        return "A"
+
+    SOME_VAR = foo()
+
+
+class Child(Parent):  # Try to pull members up
+
+
+
+    def __init__(self):
+        super(Child, self).__init__()
+        self.a = 12
+        i = 1
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/dependenciesOrder.py b/python/testData/refactoring/pullup/dependenciesOrder.py
new file mode 100644
index 0000000..789bd99
--- /dev/null
+++ b/python/testData/refactoring/pullup/dependenciesOrder.py
@@ -0,0 +1,28 @@
+class DataHolder:
+    VAR = 1
+
+class Parent:
+    BOO = 12
+
+    def __init__(self):
+        self.c = 1
+
+
+class Child(Parent):  # Try to pull members up
+    CLASS_FIELD = 42
+    ANOTHER_CLASS_FIELD = CLASS_FIELD
+    FIELD = Parent.BOO
+    A_FIELD = DataHolder.VAR
+
+    @staticmethod
+    def foo():
+        return "A"
+
+    SOME_VAR = foo()
+
+    def __init__(self):
+        super(Child, self).__init__()
+        self.a = 12
+        self.b = self.c
+        self.d = Parent.BOO
+        i = 1
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/duplicateImport/Class.after.py b/python/testData/refactoring/pullup/duplicateImport/Class.after.py
new file mode 100644
index 0000000..d1946f8
--- /dev/null
+++ b/python/testData/refactoring/pullup/duplicateImport/Class.after.py
@@ -0,0 +1,6 @@
+from SuperClass import SuperClass
+
+
+class AnyClass(SuperClass):
+    pass
+
diff --git a/python/testData/refactoring/pullup/duplicateImport/Class.py b/python/testData/refactoring/pullup/duplicateImport/Class.py
index bd19d07..ca10ac1 100644
--- a/python/testData/refactoring/pullup/duplicateImport/Class.py
+++ b/python/testData/refactoring/pullup/duplicateImport/Class.py
@@ -1,4 +1,6 @@
 from SuperClass import SuperClass
+import sys
+
 
 from sys import argv
 
@@ -7,3 +9,5 @@
         if not self.args:
             self.args = argv
         self.argument = some_argument
+        print(sys.api_version)
+
diff --git a/python/testData/refactoring/pullup/duplicateImport/SuperClass.after.py b/python/testData/refactoring/pullup/duplicateImport/SuperClass.after.py
index 19fa11b..beda7cd 100644
--- a/python/testData/refactoring/pullup/duplicateImport/SuperClass.after.py
+++ b/python/testData/refactoring/pullup/duplicateImport/SuperClass.after.py
@@ -1,4 +1,6 @@
 from sys import argv
+import sys
+
 
 class SuperClass(object):
     def __init__(self):
@@ -8,3 +10,4 @@
         if not self.args:
             self.args = argv
         self.argument = some_argument
+        print(sys.api_version)
diff --git a/python/testData/refactoring/pullup/fieldMove/Class.after.py b/python/testData/refactoring/pullup/fieldMove/Class.after.py
new file mode 100644
index 0000000..da34ab3
--- /dev/null
+++ b/python/testData/refactoring/pullup/fieldMove/Class.after.py
@@ -0,0 +1,6 @@
+from SuperClass import SuperClass
+
+
+class AnyClass(SuperClass):
+    def __init__(self):
+        super().__init__()
diff --git a/python/testData/refactoring/pullup/fieldMove/Class.py b/python/testData/refactoring/pullup/fieldMove/Class.py
new file mode 100644
index 0000000..99e7fa8
--- /dev/null
+++ b/python/testData/refactoring/pullup/fieldMove/Class.py
@@ -0,0 +1,9 @@
+import sys
+from SuperClass import SuperClass
+
+class AnyClass(SuperClass):
+    COPYRIGHT = sys.copyright
+
+    def __init__(self):
+        super().__init__()
+        self.version = sys.api_version
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/fieldMove/SuperClass.after.py b/python/testData/refactoring/pullup/fieldMove/SuperClass.after.py
new file mode 100644
index 0000000..fc7c5e9
--- /dev/null
+++ b/python/testData/refactoring/pullup/fieldMove/SuperClass.after.py
@@ -0,0 +1,8 @@
+import sys
+
+
+class SuperClass(object):
+    COPYRIGHT = sys.copyright
+
+    def __init__(self):
+        self.version = sys.api_version
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/fieldMove/SuperClass.py b/python/testData/refactoring/pullup/fieldMove/SuperClass.py
new file mode 100644
index 0000000..287177a
--- /dev/null
+++ b/python/testData/refactoring/pullup/fieldMove/SuperClass.py
@@ -0,0 +1,2 @@
+class SuperClass(object):
+   pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/instanceNotDeclaredInInit.after.py b/python/testData/refactoring/pullup/instanceNotDeclaredInInit.after.py
new file mode 100644
index 0000000..812bd9c
--- /dev/null
+++ b/python/testData/refactoring/pullup/instanceNotDeclaredInInit.after.py
@@ -0,0 +1,8 @@
+class Parent(object):
+    def __init__(self):
+        self.foo = 12
+
+
+class Child(Parent):
+    def foo(self):
+        self.foo = 12
diff --git a/python/testData/refactoring/pullup/instanceNotDeclaredInInit.py b/python/testData/refactoring/pullup/instanceNotDeclaredInInit.py
new file mode 100644
index 0000000..9e57575
--- /dev/null
+++ b/python/testData/refactoring/pullup/instanceNotDeclaredInInit.py
@@ -0,0 +1,7 @@
+class Parent(object):
+    pass
+
+
+class Child(Parent):
+    def foo(self):
+        self.foo = 12
diff --git a/python/testData/refactoring/pullup/moveClassAttributesNoPass.after.py b/python/testData/refactoring/pullup/moveClassAttributesNoPass.after.py
new file mode 100644
index 0000000..8732118
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveClassAttributesNoPass.after.py
@@ -0,0 +1,9 @@
+class Parent2:
+    CLASS_VAR = 42
+
+    def doo(self):
+        pass
+
+
+class Child2(Parent2):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/moveClassAttributesNoPass.py b/python/testData/refactoring/pullup/moveClassAttributesNoPass.py
new file mode 100644
index 0000000..2454ab2
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveClassAttributesNoPass.py
@@ -0,0 +1,7 @@
+class Parent2:
+    def doo(self):
+        pass
+
+
+class Child2(Parent2):
+    CLASS_VAR = 42
diff --git a/python/testData/refactoring/pullup/moveClassAttributesSimple.after.py b/python/testData/refactoring/pullup/moveClassAttributesSimple.after.py
new file mode 100644
index 0000000..a770871
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveClassAttributesSimple.after.py
@@ -0,0 +1,6 @@
+class Parent:
+    CLASS_VAR = 42
+
+
+class Child(Parent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/moveClassAttributesSimple.py b/python/testData/refactoring/pullup/moveClassAttributesSimple.py
new file mode 100644
index 0000000..fbfef9f
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveClassAttributesSimple.py
@@ -0,0 +1,6 @@
+class Parent:
+    pass
+
+
+class Child(Parent):
+    CLASS_VAR = 42
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.after.py b/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.after.py
new file mode 100644
index 0000000..b379333
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.after.py
@@ -0,0 +1,21 @@
+class Parent(object):
+    C = 12
+
+    def __init__(self):
+        self.foo = 12
+
+    def foo(self):
+        pass
+
+
+class Child(Parent, object):
+    def __init__(self): pass
+
+    AC = 11
+
+    def foo(self):
+        pass
+
+
+class Bar(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.py b/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.py
new file mode 100644
index 0000000..36721bf
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.py
@@ -0,0 +1,19 @@
+class Parent(object):
+    C = 12
+
+    def foo(self):
+        pass
+
+
+class Child(Parent, object):
+    def __init__(self):
+        self.foo = 12
+
+    AC = 11
+
+    def foo(self):
+        pass
+
+
+class Bar(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.after.py b/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.after.py
new file mode 100644
index 0000000..ec67fd6
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.after.py
@@ -0,0 +1,9 @@
+class Parent:
+      def __init__(self):
+          self.instance_field = "eggs"
+
+
+class Child(Parent):
+    def __init__(self):
+        Parent2.__init__(self)
+
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.py b/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.py
new file mode 100644
index 0000000..88866c1
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesNoInit.py
@@ -0,0 +1,9 @@
+class Parent:
+      pass
+
+
+class Child(Parent):
+    def __init__(self):
+        Parent2.__init__(self)
+        self.instance_field = "eggs"
+
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesSimple.after.py b/python/testData/refactoring/pullup/moveInstanceAttributesSimple.after.py
new file mode 100644
index 0000000..c1d9a6b
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesSimple.after.py
@@ -0,0 +1,9 @@
+class Parent:
+    def __init__(self):
+        self.instance_field = "eggs"
+
+
+class Child(Parent):
+    def __init__(self):
+        Parent2.__init__(self)
+
diff --git a/python/testData/refactoring/pullup/moveInstanceAttributesSimple.py b/python/testData/refactoring/pullup/moveInstanceAttributesSimple.py
new file mode 100644
index 0000000..2cf1c16
--- /dev/null
+++ b/python/testData/refactoring/pullup/moveInstanceAttributesSimple.py
@@ -0,0 +1,10 @@
+class Parent:
+    def __init__(self):
+        pass
+
+
+class Child(Parent):
+    def __init__(self):
+        Parent2.__init__(self)
+        self.instance_field = "eggs"
+
diff --git a/python/testData/refactoring/pullup/multiFile/Class.after.py b/python/testData/refactoring/pullup/multiFile/Class.after.py
new file mode 100644
index 0000000..1def8e5
--- /dev/null
+++ b/python/testData/refactoring/pullup/multiFile/Class.after.py
@@ -0,0 +1,4 @@
+from SuperClass import SuperClass
+
+class AnyClass(SuperClass):
+    pass
diff --git a/python/testData/refactoring/pullup/presenter/file.py b/python/testData/refactoring/pullup/presenter/file.py
new file mode 100644
index 0000000..cb6ca95
--- /dev/null
+++ b/python/testData/refactoring/pullup/presenter/file.py
@@ -0,0 +1,82 @@
+from datetime import datetime
+from datetime import date
+
+class MainParent(object):
+    pass
+
+class SubParent1(MainParent):
+    def foo(self):
+        pass
+    pass
+
+class SubParent2(MainParent):
+    pass
+
+class Child(SubParent1, SubParent2):
+    def spam(self):
+        pass
+    pass
+
+class NoParentsAllowed(datetime, object):
+    def foo(self):
+        pass
+    pass
+
+
+class NoMembers(object):
+    pass
+
+class BadMro(MainParent, object, SubParent1, SubParent2):
+    pass
+
+class HugeChild(SubParent1, date): #SubParent1 is disabled
+    def __init__(self):
+        self.instance_field_1 = 42
+        self.instance_field_2 = 100500
+
+    CLASS_FIELD = 42
+    (CLASS_FIELD_A,CLASS_FIELD_B) = (42,100500) #We do not support tuples in class assignments for now (see ClassFieldsManager)
+    def foo(self): #should be disabled
+        pass
+    def bar(self):
+        pass
+
+    @classmethod
+    def static_1(cls): # Could be abstract in Py3K
+        pass
+
+    @staticmethod
+    def static_2():  # Could be abstract in Py3K
+        pass
+
+
+    @staticmethod
+        def bad_method(): #Code has errors, so method should be not be marked as static
+            pass
+
+class Bar(object):
+    C = 1
+
+class Foo(Bar):
+    def __init__(self):
+        self.foo = 12
+
+
+class ParentWithConflicts(Bar):
+    CLASS_FIELD = 42
+    def __init__(self):
+        self.instance_field = 12
+
+    def my_func(self):
+        pass
+
+
+class ChildWithConflicts(ParentWithConflicts, Bar): # Bar -> conflict
+    CLASS_FIELD = 42 # Conflict
+    GOOD_FIELD = 32
+    def __init__(self):
+        self.instance_field = 12 # Conflict
+        self.good_instance_field = "egg"
+
+    def my_func(self): # Conflict
+        pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/pyPullUpInfoModel.py b/python/testData/refactoring/pullup/pyPullUpInfoModel.py
new file mode 100644
index 0000000..04f6430
--- /dev/null
+++ b/python/testData/refactoring/pullup/pyPullUpInfoModel.py
@@ -0,0 +1,39 @@
+class EmptyParent:pass
+
+class SomeParent:
+    PARENT_CLASS_FIELD = 42
+
+    def __init__(self):
+        self.parent_instance_field = "egg"
+
+    def parent_func(self):
+        pass
+
+
+class ChildWithDependencies(SomeParent, EmptyParent):
+    CLASS_FIELD_FOO = 42
+    CLASS_FIELD_DEPENDS_ON_CLASS_FIELD_FOO = CLASS_FIELD_FOO
+    CLASS_FIELD_DEPENDS_ON_PARENT_FIELD = SomeParent.PARENT_CLASS_FIELD
+
+    def __init__(self):
+        SomeParent.__init__(self)
+        self.instance_field_bar = 42
+        self.depends_on_instance_field_bar = self.instance_field_bar
+        self.depends_on_class_field_foo = ChildWithDependencies.CLASS_FIELD_FOO
+
+    def normal_method(self):
+        pass
+
+    def method_depends_on_parent_method(self):
+        self.parent_func()
+        pass
+
+    def method_depends_on_parent_field(self):
+        i = self.parent_instance_field
+        pass
+
+    def method_depends_on_normal_method(self):
+        self.normal_method()
+
+    def method_depends_on_instance_field_bar(self):
+        eggs = self.instance_field_bar
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/severalParents.after.py b/python/testData/refactoring/pullup/severalParents.after.py
new file mode 100644
index 0000000..cd45e22
--- /dev/null
+++ b/python/testData/refactoring/pullup/severalParents.after.py
@@ -0,0 +1,13 @@
+class Spam:
+    pass
+
+class Parent_1(object, Spam):
+    pass
+
+
+class Parent_2():
+    pass
+
+
+class Child(Parent_1, Parent_2):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/severalParents.py b/python/testData/refactoring/pullup/severalParents.py
new file mode 100644
index 0000000..2c5f7a1
--- /dev/null
+++ b/python/testData/refactoring/pullup/severalParents.py
@@ -0,0 +1,13 @@
+class Spam:
+    pass
+
+class Parent_1(object):
+    pass
+
+
+class Parent_2():
+    pass
+
+
+class Child(Parent_1, Parent_2, Spam):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pullup/withComments.after.py b/python/testData/refactoring/pullup/withComments.after.py
index ce91117..d2d920f 100644
--- a/python/testData/refactoring/pullup/withComments.after.py
+++ b/python/testData/refactoring/pullup/withComments.after.py
@@ -2,8 +2,10 @@
     def foo(self):
         print("a")
 
-    # this is boo
     def boo(self):
+        """
+        In python we use multi-line comments inside of method body
+        """
         print "rrrrr"
 
 
diff --git a/python/testData/refactoring/pullup/withComments.py b/python/testData/refactoring/pullup/withComments.py
index 32edbc3..a044302 100644
--- a/python/testData/refactoring/pullup/withComments.py
+++ b/python/testData/refactoring/pullup/withComments.py
@@ -3,6 +3,8 @@
         print("a")
 
 class Boo(Foo):
-    # this is boo
     def boo(self):
+        """
+        In python we use multi-line comments inside of method body
+        """
         print "rrrrr"
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/existingmethod.after.py b/python/testData/refactoring/pushdown/existingmethod.after.py
index 25daa38..b396cd5 100644
--- a/python/testData/refactoring/pushdown/existingmethod.after.py
+++ b/python/testData/refactoring/pushdown/existingmethod.after.py
@@ -1,5 +1,7 @@
 class Foo:
+    pass
 
-class Boo():
+
+class Boo(Foo):
     def foo(self):
         print "rrrrr"
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/full.after.py b/python/testData/refactoring/pushdown/full.after.py
new file mode 100644
index 0000000..0845450
--- /dev/null
+++ b/python/testData/refactoring/pushdown/full.after.py
@@ -0,0 +1,48 @@
+class Dummny(object):
+    pass
+
+
+class Parent(object):
+    """
+    This class is usefull.
+    """
+    CLASS_VAR_2 = 2
+
+    def __init__(self): pass
+
+
+    def method_2(self):
+        i = 1
+
+
+class Child_1(Parent, Dummny):
+    CLASS_VAR_1 = 1
+
+    def __init__(self):
+        self.inst_var = 12
+        self.bar = 64
+
+    def method_1(self):
+        """
+        Some text
+        """
+        pass
+
+
+class Child_2(Parent, Dummny):
+    """
+    This class implements most sophisticated algorithm
+    """
+    CLASS_VAR_1 = 1
+
+    def __init__(self):
+        self.inst_var = 12
+
+    def lala(self):
+        pass
+
+    def method_1(self):
+        """
+        Some text
+        """
+        pass
diff --git a/python/testData/refactoring/pushdown/full.before.py b/python/testData/refactoring/pushdown/full.before.py
new file mode 100644
index 0000000..30b205b
--- /dev/null
+++ b/python/testData/refactoring/pushdown/full.before.py
@@ -0,0 +1,37 @@
+class Dummny(object):
+    pass
+
+
+class Parent(object, Dummny):
+    """
+    This class is usefull.
+    """
+    CLASS_VAR_1 = 1
+    CLASS_VAR_2 = 2
+
+    def __init__(self):
+        self.inst_var = 12
+
+
+    def method_1(self):
+        """
+        Some text
+        """
+        pass
+
+    def method_2(self):
+        i = 1
+
+
+class Child_1(Parent):
+    def __init__(self):
+        self.bar = 64
+    pass
+
+
+class Child_2(Parent):
+    """
+    This class implements most sophisticated algorithm
+    """
+    def lala(self):
+        pass
diff --git a/python/testData/refactoring/pushdown/multiFileImports/child_module.after.py b/python/testData/refactoring/pushdown/multiFileImports/child_module.after.py
new file mode 100644
index 0000000..020596c
--- /dev/null
+++ b/python/testData/refactoring/pushdown/multiFileImports/child_module.after.py
@@ -0,0 +1,7 @@
+from parent_module import Parent
+from shared_module import module_function
+
+
+class Child(Parent):
+    def should_be_pushed(self):
+        module_function()
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/multiFileImports/child_module.py b/python/testData/refactoring/pushdown/multiFileImports/child_module.py
new file mode 100644
index 0000000..86716f1
--- /dev/null
+++ b/python/testData/refactoring/pushdown/multiFileImports/child_module.py
@@ -0,0 +1,4 @@
+from parent_module import Parent
+
+class Child(Parent):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/multiFileImports/parent_module.after.py b/python/testData/refactoring/pushdown/multiFileImports/parent_module.after.py
new file mode 100644
index 0000000..b63dd44
--- /dev/null
+++ b/python/testData/refactoring/pushdown/multiFileImports/parent_module.after.py
@@ -0,0 +1,2 @@
+class Parent(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/multiFileImports/parent_module.py b/python/testData/refactoring/pushdown/multiFileImports/parent_module.py
new file mode 100644
index 0000000..aeeb449
--- /dev/null
+++ b/python/testData/refactoring/pushdown/multiFileImports/parent_module.py
@@ -0,0 +1,6 @@
+from shared_module import module_function
+
+
+class Parent(object):
+    def should_be_pushed(self):
+        module_function()
\ No newline at end of file
diff --git a/python/testData/refactoring/pushdown/multiFileImports/shared_module.py b/python/testData/refactoring/pushdown/multiFileImports/shared_module.py
new file mode 100644
index 0000000..13fe833
--- /dev/null
+++ b/python/testData/refactoring/pushdown/multiFileImports/shared_module.py
@@ -0,0 +1,9 @@
+MODULE_CONTANT = 42
+
+
+def module_function():
+    pass
+
+
+class ModuleClass(object):
+    pass
\ No newline at end of file
diff --git a/python/testData/refactoring/rename/docstringParams.py b/python/testData/refactoring/rename/docstringParams.py
new file mode 100644
index 0000000..4a79b84
--- /dev/null
+++ b/python/testData/refactoring/rename/docstringParams.py
@@ -0,0 +1,9 @@
+class SomeClass(object):
+    """ Awesome class
+
+    @ivar someVar: great stuff
+    @type someVar: string
+    """
+
+    def __init__(self):
+        self.some<caret>Var = None
\ No newline at end of file
diff --git a/python/testData/refactoring/rename/docstringParams_after.py b/python/testData/refactoring/rename/docstringParams_after.py
new file mode 100644
index 0000000..ae4d5e5
--- /dev/null
+++ b/python/testData/refactoring/rename/docstringParams_after.py
@@ -0,0 +1,9 @@
+class SomeClass(object):
+    """ Awesome class
+
+    @ivar bar: great stuff
+    @type bar: string
+    """
+
+    def __init__(self):
+        self.bar = None
\ No newline at end of file
diff --git a/python/testData/refactoring/unwrap/ifInIfUnwrap_after.py b/python/testData/refactoring/unwrap/ifInIfUnwrap_after.py
index 68407fb..1473f8f 100644
--- a/python/testData/refactoring/unwrap/ifInIfUnwrap_after.py
+++ b/python/testData/refactoring/unwrap/ifInIfUnwrap_after.py
@@ -1,4 +1,4 @@
 if False:
-    #comment
+    # comment
     x = 1<caret>
     y = 2
diff --git a/python/testData/refactoring/unwrap/ifInIfUnwrap_before.py b/python/testData/refactoring/unwrap/ifInIfUnwrap_before.py
index 2bb897c..4e4fa45 100644
--- a/python/testData/refactoring/unwrap/ifInIfUnwrap_before.py
+++ b/python/testData/refactoring/unwrap/ifInIfUnwrap_before.py
@@ -1,5 +1,5 @@
 if False:
     if True:
-        #comment
+        # comment
         x = 1<caret>
         y = 2
diff --git a/python/testData/refactoring/unwrap/ifInWhileUnwrap_after.py b/python/testData/refactoring/unwrap/ifInWhileUnwrap_after.py
index a3de7bd..61a8c67 100644
--- a/python/testData/refactoring/unwrap/ifInWhileUnwrap_after.py
+++ b/python/testData/refactoring/unwrap/ifInWhileUnwrap_after.py
@@ -1,4 +1,4 @@
 while False:
-    #comment
+    # comment
     x = 1<caret>
     y = 2
diff --git a/python/testData/refactoring/unwrap/ifInWhileUnwrap_before.py b/python/testData/refactoring/unwrap/ifInWhileUnwrap_before.py
index a612cbc..b47a4d5 100644
--- a/python/testData/refactoring/unwrap/ifInWhileUnwrap_before.py
+++ b/python/testData/refactoring/unwrap/ifInWhileUnwrap_before.py
@@ -1,5 +1,5 @@
 while False:
     if True:
-        #comment
+        # comment
         x = 1<caret>
         y = 2
diff --git a/python/testData/refactoring/unwrap/whileInIfUnwrap_after.py b/python/testData/refactoring/unwrap/whileInIfUnwrap_after.py
index 02d1de0..a855afb 100644
--- a/python/testData/refactoring/unwrap/whileInIfUnwrap_after.py
+++ b/python/testData/refactoring/unwrap/whileInIfUnwrap_after.py
@@ -1,4 +1,4 @@
 if True:
-    #comment
+    # comment
     x = 1<caret>
     y = 2
diff --git a/python/testData/refactoring/unwrap/whileInIfUnwrap_before.py b/python/testData/refactoring/unwrap/whileInIfUnwrap_before.py
index 3fb06a2..ddd29ac 100644
--- a/python/testData/refactoring/unwrap/whileInIfUnwrap_before.py
+++ b/python/testData/refactoring/unwrap/whileInIfUnwrap_before.py
@@ -1,5 +1,5 @@
 if True:
     while False:
-        #comment
+        # comment
         x = 1<caret>
         y = 2
diff --git a/python/testData/refactoring/unwrap/whileInWhileUnwrap_after.py b/python/testData/refactoring/unwrap/whileInWhileUnwrap_after.py
index d5a3c2b..fc23ac4 100644
--- a/python/testData/refactoring/unwrap/whileInWhileUnwrap_after.py
+++ b/python/testData/refactoring/unwrap/whileInWhileUnwrap_after.py
@@ -1,4 +1,4 @@
 while True:
-    #comment
+    # comment
     x = 1<caret>
     y = 2
diff --git a/python/testData/refactoring/unwrap/whileInWhileUnwrap_before.py b/python/testData/refactoring/unwrap/whileInWhileUnwrap_before.py
index 631003f..a7cb503 100644
--- a/python/testData/refactoring/unwrap/whileInWhileUnwrap_before.py
+++ b/python/testData/refactoring/unwrap/whileInWhileUnwrap_before.py
@@ -1,5 +1,5 @@
 while True:
     while False:
-        #comment
+        # comment
         x = 1<caret>
         y = 2
diff --git a/python/testData/stubs/MetaClass.py b/python/testData/stubs/MetaClass.py
new file mode 100644
index 0000000..d882691
--- /dev/null
+++ b/python/testData/stubs/MetaClass.py
@@ -0,0 +1,13 @@
+class M(type):
+    pass
+
+
+__metaclass__ = M
+
+
+class C(object):
+    __metaclass__ = type
+
+
+class D(object):
+    pass
diff --git a/python/testData/surround/SurroundWithTryExcept.py b/python/testData/surround/SurroundWithTryExcept.py
index faee07e..ee6e2cb 100644
--- a/python/testData/surround/SurroundWithTryExcept.py
+++ b/python/testData/surround/SurroundWithTryExcept.py
@@ -1,2 +1,2 @@
 def foo():
-    <selection>print "hello"</selection>    
\ No newline at end of file
+    pr<caret>int "hello"
\ No newline at end of file
diff --git a/python/testData/surround/SurroundWithTryExcept_after.py b/python/testData/surround/SurroundWithTryExcept_after.py
index 54b20bc..ae244ff 100644
--- a/python/testData/surround/SurroundWithTryExcept_after.py
+++ b/python/testData/surround/SurroundWithTryExcept_after.py
@@ -2,4 +2,4 @@
     try:
         print "hello"
     except:
-        <selection>pass</selection>    
\ No newline at end of file
+        <selection>pass</selection>
diff --git a/python/testData/wrap/DontWrapStartOfString.after.py b/python/testData/wrap/DontWrapStartOfString.after.py
new file mode 100644
index 0000000..f3fc48a
--- /dev/null
+++ b/python/testData/wrap/DontWrapStartOfString.after.py
@@ -0,0 +1,2 @@
+call_command(' '
+             'regressiontests_some_long_text_here_to_test_right_margin_some_long_text_here_to_test_right_margin_some_long_text_here_to_test_right_margin')
\ No newline at end of file
diff --git a/python/testData/wrap/DontWrapStartOfString.py b/python/testData/wrap/DontWrapStartOfString.py
new file mode 100644
index 0000000..06905d2
--- /dev/null
+++ b/python/testData/wrap/DontWrapStartOfString.py
@@ -0,0 +1 @@
+call_command(' regressiontests<caret>')
\ No newline at end of file
diff --git a/python/testData/wrap/wrapRightMargin.after.py b/python/testData/wrap/wrapRightMargin.after.py
index b7ed9d5..1d20b40 100644
--- a/python/testData/wrap/wrapRightMargin.after.py
+++ b/python/testData/wrap/wrapRightMargin.after.py
@@ -1,4 +1,4 @@
 def do_stuff():
     another_long_variable = a_really_long_function_name_with_parameters(12,
                                                         this_is_the_first_param=23, 
-                                                 this_is_the_second=45).do_more_stuff_to_the_result()
+                     this_is_the_second=45).do_more_stuff_to_the_result()