X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e818260f1a223929d8f2056f484b73eaa8687622..4ad7c9c1073df57b22cabc9b73f8f9aae3e36ec9:/tests/class_methods_new_line.py diff --git a/tests/class_methods_new_line.py b/tests/class_methods_new_line.py index b098271..9a96ffe 100644 --- a/tests/class_methods_new_line.py +++ b/tests/class_methods_new_line.py @@ -1,8 +1,16 @@ class ClassSimplest: pass +class ClassWithSingleField: + a = 1 +class ClassWithJustTheDocstring: + """Just a docstring.""" class ClassWithInit: def __init__(self): pass +class ClassWithTheDocstringAndInit: + """Just a docstring.""" + def __init__(self): + pass class ClassWithInitAndVars: cls_var = 100 def __init__(self): @@ -12,6 +20,84 @@ class ClassWithInitAndVarsAndDocstring: cls_var = 100 def __init__(self): pass +class ClassWithDecoInit: + @deco + def __init__(self): + pass +class ClassWithDecoInitAndVars: + cls_var = 100 + @deco + def __init__(self): + pass +class ClassWithDecoInitAndVarsAndDocstring: + """Test class""" + cls_var = 100 + @deco + def __init__(self): + pass +class ClassSimplestWithInner: + class Inner: + pass +class ClassSimplestWithInnerWithDocstring: + class Inner: + """Just a docstring.""" + def __init__(self): + pass +class ClassWithSingleFieldWithInner: + a = 1 + class Inner: + pass +class ClassWithJustTheDocstringWithInner: + """Just a docstring.""" + class Inner: + pass +class ClassWithInitWithInner: + class Inner: + pass + def __init__(self): + pass +class ClassWithInitAndVarsWithInner: + cls_var = 100 + class Inner: + pass + def __init__(self): + pass +class ClassWithInitAndVarsAndDocstringWithInner: + """Test class""" + cls_var = 100 + class Inner: + pass + def __init__(self): + pass +class ClassWithDecoInitWithInner: + class Inner: + pass + @deco + def __init__(self): + pass +class ClassWithDecoInitAndVarsWithInner: + cls_var = 100 + class Inner: + pass + @deco + def __init__(self): + pass +class ClassWithDecoInitAndVarsAndDocstringWithInner: + """Test class""" + cls_var = 100 + class Inner: + pass + @deco + def __init__(self): + pass +class ClassWithDecoInitAndVarsAndDocstringWithInner2: + """Test class""" + class Inner: + pass + cls_var = 100 + @deco + def __init__(self): + pass # output @@ -21,11 +107,26 @@ class ClassSimplest: pass +class ClassWithSingleField: + a = 1 + + +class ClassWithJustTheDocstring: + """Just a docstring.""" + + class ClassWithInit: def __init__(self): pass +class ClassWithTheDocstringAndInit: + """Just a docstring.""" + + def __init__(self): + pass + + class ClassWithInitAndVars: cls_var = 100 @@ -40,3 +141,130 @@ class ClassWithInitAndVarsAndDocstring: def __init__(self): pass + + +class ClassWithDecoInit: + @deco + def __init__(self): + pass + + +class ClassWithDecoInitAndVars: + cls_var = 100 + + @deco + def __init__(self): + pass + + +class ClassWithDecoInitAndVarsAndDocstring: + """Test class""" + + cls_var = 100 + + @deco + def __init__(self): + pass + + +class ClassSimplestWithInner: + class Inner: + pass + + +class ClassSimplestWithInnerWithDocstring: + class Inner: + """Just a docstring.""" + + def __init__(self): + pass + + +class ClassWithSingleFieldWithInner: + a = 1 + + class Inner: + pass + + +class ClassWithJustTheDocstringWithInner: + """Just a docstring.""" + + class Inner: + pass + + +class ClassWithInitWithInner: + class Inner: + pass + + def __init__(self): + pass + + +class ClassWithInitAndVarsWithInner: + cls_var = 100 + + class Inner: + pass + + def __init__(self): + pass + + +class ClassWithInitAndVarsAndDocstringWithInner: + """Test class""" + + cls_var = 100 + + class Inner: + pass + + def __init__(self): + pass + + +class ClassWithDecoInitWithInner: + class Inner: + pass + + @deco + def __init__(self): + pass + + +class ClassWithDecoInitAndVarsWithInner: + cls_var = 100 + + class Inner: + pass + + @deco + def __init__(self): + pass + + +class ClassWithDecoInitAndVarsAndDocstringWithInner: + """Test class""" + + cls_var = 100 + + class Inner: + pass + + @deco + def __init__(self): + pass + + +class ClassWithDecoInitAndVarsAndDocstringWithInner2: + """Test class""" + + class Inner: + pass + + cls_var = 100 + + @deco + def __init__(self): + pass