Commit ce481836 authored by Jason R. Coombs's avatar Jason R. Coombs

caught is a better name here

parent 264b5dc6
...@@ -111,10 +111,10 @@ class TestExceptionSaver: ...@@ -111,10 +111,10 @@ class TestExceptionSaver:
An unpickleable exception (not in globals). An unpickleable exception (not in globals).
""" """
with pytest.raises(setuptools.sandbox.UnpickleableException) as exc: with pytest.raises(setuptools.sandbox.UnpickleableException) as caught:
with setuptools.sandbox.save_modules(): with setuptools.sandbox.save_modules():
setuptools.sandbox.hide_setuptools() setuptools.sandbox.hide_setuptools()
raise ExceptionUnderTest() raise ExceptionUnderTest()
msg, = exc.value.args msg, = caught.value.args
assert msg == 'ExceptionUnderTest()' assert msg == 'ExceptionUnderTest()'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment