Skip to content

Commit

Permalink
Refactor tests to take advantage of CompileResult.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 2, 2017
1 parent 725b3a8 commit 7f2f163
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 213 deletions.
4 changes: 2 additions & 2 deletions tests/test_compile.py
Expand Up @@ -95,7 +95,7 @@ def no_exec():
@pytest.mark.parametrize(*compile)
def test_compile__compile_restricted_exec__10(compile):
"""It is a SyntaxError to use the `exec` statement. (Python 3 only)"""
code, errors, warnings, used_names = compile(EXEC_STATEMENT)
result = compile(EXEC_STATEMENT)
assert (
"Line 2: SyntaxError: Missing parentheses in call to 'exec' in on "
"statement: exec 'q = 1'",) == errors
"statement: exec 'q = 1'",) == result.errors

0 comments on commit 7f2f163

Please sign in to comment.