Skip to content

Commit

Permalink
Get rid of c_single parametrize parameter.
Browse files Browse the repository at this point in the history
It is not needed any more.
  • Loading branch information
Michael Howitz committed Feb 9, 2019
1 parent 96ecef8 commit 5c7c1e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 0 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ def _eval(source, glb=None):
e_exec = ('e_exec', [_exec(RestrictedPython.compile.compile_restricted_exec)])
# Compile and execute in `eval` mode.
e_eval = ('e_eval', [_eval(RestrictedPython.compile.compile_restricted_eval)])
#
c_single = ('c_single', [RestrictedPython.compile.compile_restricted_single])
7 changes: 3 additions & 4 deletions tests/test_compile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from RestrictedPython import compile_restricted
from RestrictedPython import compile_restricted_eval
from RestrictedPython import compile_restricted_exec
from RestrictedPython import compile_restricted_single
from RestrictedPython import CompileResult
from RestrictedPython._compat import IS_PY2
from RestrictedPython._compat import IS_PY3
from RestrictedPython._compat import IS_PY38_OR_GREATER
from tests import c_single
from tests import e_eval

import platform
Expand Down Expand Up @@ -154,10 +154,9 @@ def test_compile__compile_restricted_eval__used_names():
assert result.used_names == {'a': True, 'b': True, 'x': True, 'func': True}


@pytest.mark.parametrize(*c_single)
def test_compile__compile_restricted_csingle(c_single):
def test_compile__compile_restricted_csingle():
"""It compiles code as an Interactive."""
result = c_single('4 * 6')
result = compile_restricted_single('4 * 6')
assert result.code is None
assert result.errors == (
'Line None: Interactive statements are not allowed.',
Expand Down

0 comments on commit 5c7c1e3

Please sign in to comment.