Skip to content

Commit

Permalink
Apply review suggestion from @icemac
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Howitz <[email protected]>
  • Loading branch information
d-maurer and icemac authored Oct 2, 2024
1 parent 4c1e240 commit eb4d5a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_Guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ def test_Guards__safer_getattr__5():
def test_Guards__safer_getattr_raise():
from types import SimpleNamespace

from RestrictedPython.Guards import safer_getattr_raise as ga
from RestrictedPython.Guards import safer_getattr_raise

o = SimpleNamespace(a="a")
assert ga(o, "a") == "a"
assert ga(o, "b", None) is None
assert safer_getattr_raise(o, "a") == "a"
assert safer_getattr_raise(o, "b", None) is None
with pytest.raises(AttributeError):
ga(o, "b")
safer_getattr_raise(o, "b")


def test_call_py3_builtins():
Expand Down

0 comments on commit eb4d5a9

Please sign in to comment.