Skip to content

Commit

Permalink
Merge branch 'master' into fix-147
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 8, 2019
2 parents 43a71c0 + 21e08d4 commit 25a9d65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: python
sudo: false

matrix:
include:
Expand All @@ -16,15 +15,12 @@ matrix:
- python: "3.7"
env: TOXENV=py37,py37-datetime
dist: xenial
sudo: true
- python: "3.7-dev"
env: TOXENV=py37,py37-datetime
dist: xenial
sudo: true
- python: "3.8-dev"
env: TOXENV=py38,py38-datetime
dist: xenial
sudo: true
allow_failures:
- python: "3.8-dev"
env: TOXENV=py38,py38-datetime
Expand Down
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def _eval(compile_func):
def _eval(source, glb=None):
code = _compile(compile_func, source)
if glb is None:
glb = {}
glb = {
'__builtins__': RestrictedPython.Guards.safe_builtins.copy()}
return eval(code, glb)
return _eval

Expand Down
2 changes: 1 addition & 1 deletion tests/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_compile_restricted_eval():
"""This test checks compile_restricted itself if that raise Python errors.
"""
with pytest.raises(SyntaxError,
message="Line 3: Eval calls are not allowed."):
match="Line 3: Eval calls are not allowed."):
compile_restricted(EVAL_EXAMPLE, '<string>', 'exec')


Expand Down

0 comments on commit 25a9d65

Please sign in to comment.