diff options
Diffstat (limited to 'tests/indent/python')
| -rw-r--r-- | tests/indent/python/aligned_indent.py | 11 | ||||
| -rw-r--r-- | tests/indent/python/basic_blocks.py | 14 | ||||
| -rw-r--r-- | tests/indent/python/basic_collections.py | 23 | ||||
| -rw-r--r-- | tests/indent/python/branches.py | 27 | ||||
| -rw-r--r-- | tests/indent/python/comprehensions.py | 25 | ||||
| -rw-r--r-- | tests/indent/python/control_flow.py | 22 | ||||
| -rw-r--r-- | tests/indent/python/hanging_indent.py | 6 | ||||
| -rw-r--r-- | tests/indent/python/join_lines.py | 8 | ||||
| -rw-r--r-- | tests/indent/python/nested_collections.py | 41 | ||||
| -rw-r--r-- | tests/indent/python/strings.py | 17 |
10 files changed, 194 insertions, 0 deletions
diff --git a/tests/indent/python/aligned_indent.py b/tests/indent/python/aligned_indent.py new file mode 100644 index 000000000..2a4b827f4 --- /dev/null +++ b/tests/indent/python/aligned_indent.py @@ -0,0 +1,11 @@ +def aligned_indent(arg1, + arg2): + pass + +aligned_indent(1, + 2) + + +aligned_indent(1, + 2 + ) diff --git a/tests/indent/python/basic_blocks.py b/tests/indent/python/basic_blocks.py new file mode 100644 index 000000000..4f36359bd --- /dev/null +++ b/tests/indent/python/basic_blocks.py @@ -0,0 +1,14 @@ +from os import ( + path, + name as OsName +) + +def foo(x): + pass + +class Foo: + def __init__(self): + pass + + def foo(self): + pass diff --git a/tests/indent/python/basic_collections.py b/tests/indent/python/basic_collections.py new file mode 100644 index 000000000..1582b9059 --- /dev/null +++ b/tests/indent/python/basic_collections.py @@ -0,0 +1,23 @@ +# list +a = [ + 1, 2, + 3 +] + +# set +b = { + 3, + 4, +} + +# dict +c = { + 'a': 'b', + 'c': 1, +} + +# tuple +d = ( + 1, + 2, +) diff --git a/tests/indent/python/branches.py b/tests/indent/python/branches.py new file mode 100644 index 000000000..7ce106bd7 --- /dev/null +++ b/tests/indent/python/branches.py @@ -0,0 +1,27 @@ +a = [ + 1, 2, 3] + +b = [ + x + 1 + for x in range(3)] + +c = [[[ + 1 +]]] + +d = [[[ + 4]]] + +e = [[ + 1], 2, 3] + +def foo(x, y): + pass + +foo( + a, + b) + +if (a and + b): + pass diff --git a/tests/indent/python/comprehensions.py b/tests/indent/python/comprehensions.py new file mode 100644 index 000000000..53c3961e1 --- /dev/null +++ b/tests/indent/python/comprehensions.py @@ -0,0 +1,25 @@ +# list +a = [ + x + 1 for x in range(3) +] + +# dict +b = { + x: x + 1 for x in range(3) +} + +# generator |
