Permalink
Browse files

Add tests for IndentationError and SyntaxError

  • Loading branch information...
Delgan committed Oct 19, 2017
1 parent ab227a9 commit 3c5870cf0d6e84a6721efdec1c1e28ecb229e3a9
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
 └ '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
 └ '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
└ '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
└ '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
 -> '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
 -> '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
-> '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
-> '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
 └ '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
 └ '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
└ '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
└ '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
 -> '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
 -> '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
-> '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
-> '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
@@ -182,3 +182,40 @@ TypeError: unsupported operand type(s) for /: 'int' and 'str'
python2 test/test_indentation_error.py
Traceback (most recent call last):
File "test/test_indentation_error.py", line 13, in <module>
exec(code)
 └ '
if True:
a = 5
print("foobar") #intentional faulty indentation here.
b = 7
'
File "<string>", line 4
print("foobar") #intentional faulty indentation here.
^
IndentationError: unexpected indent
python2 test/test_syntax_error.py
Traceback (most recent call last):
File "test/test_syntax_error.py", line 12, in <module>
exec(code)
 └ '
if True:
a = 5
b = 7 *
'
File "<string>", line 4
b = 7 *
^
SyntaxError: invalid syntax
Oops, something went wrong.

0 comments on commit 3c5870c

Please sign in to comment.