Skip to content
Permalink
Browse files

reformat to not invoke this warning

  • Loading branch information
alex committed Jul 10, 2013
1 parent e8b9787 commit 1ef50abe87b6e4df6b2dc05ddb5bddb22d30e41c
Showing with 15 additions and 17 deletions.
  1. +1 −2 tasks/travis.py
  2. +14 −15 tests/test_parser.py
@@ -130,14 +130,13 @@ def run_docs_tests(env):

def run_flake8_tests(env):
# E122 continuation line missing indentation or outdented
# E123 closing bracket does not match indentation of opening bracket's line
# E124 closing bracket does not match visual indentation
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E501 line too long
# F811 redefinition of unused
invoke.run('flake8 . --ignore="E122,E123,E124,E125,E126,E128,E501,F811"')
invoke.run('flake8 . --ignore="E122,E124,E125,E126,E128,E501,F811"')


TEST_TYPES = {
@@ -395,8 +395,8 @@ def test_splat_rhs_assignment(self, space):
ast.ConstantInt(2),
ast.ConstantInt(3),
])),
]
)))
])
))
]))
assert space.parse("a = *2, 0") == ast.Main(ast.Block([
ast.Statement(ast.Assignment(
@@ -549,12 +549,10 @@ def test_elsif(self, space):
ast.Statement(ast.If(ast.ConstantInt(3), ast.Block([
ast.Statement(ast.ConstantInt(5))
]), ast.If(ast.Send(ast.ConstantInt(4), "==", [ast.ConstantInt(2)], None, 4), ast.Block([
ast.Statement(ast.ConstantInt(3))
]), ast.If(ast.Send(ast.ConstantInt(3), "==", [ast.ConstantInt(1)], None, 6), ast.Block([
ast.Statement(ast.ConstantInt(2))
]), ast.Nil()))
)
)
ast.Statement(ast.ConstantInt(3))
]), ast.If(ast.Send(ast.ConstantInt(3), "==", [ast.ConstantInt(1)], None, 6), ast.Block([
ast.Statement(ast.ConstantInt(2))
]), ast.Nil()))))
]))

def test_elsif_else(self, space):
@@ -571,11 +569,10 @@ def test_elsif_else(self, space):
ast.Statement(ast.If(ast.Nil(), ast.Block([
ast.Statement(ast.ConstantInt(5))
]), ast.If(ast.Nil(), ast.Block([
ast.Statement(ast.ConstantInt(10)),
]), ast.Block([
ast.Statement(ast.ConstantInt(200))
]))
))
ast.Statement(ast.ConstantInt(10)),
]), ast.Block([
ast.Statement(ast.ConstantInt(200))
]))))
]))

def test_comparison_ops(self, space):
@@ -652,7 +649,8 @@ def test_for(self, space):
ast.MultiAssignable([ast.Variable("i", 1)]),
ast.Variable("0", 1)
))
])), 1))
])
), 1))
]))

res = space.parse("""
@@ -671,7 +669,8 @@ def test_for(self, space):
ast.Statement(ast.Send(ast.Self(4), "puts", [ast.Variable("i", 4)], None, 4)),
ast.Statement(ast.Send(ast.Self(5), "puts", [ast.ConstantInt(1)], None, 5)),
ast.Statement(ast.Send(ast.Self(6), "puts", [ast.Variable("i", 6)], None, 6)),
])), 3))
])
), 3))
]))

res = space.parse("""

0 comments on commit 1ef50ab

Please sign in to comment.
You can’t perform that action at this time.