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

Add test capturing infinite recursion. Ref #440.

parent 7fd5df90
......@@ -100,3 +100,13 @@ class TestExceptionSaver:
saved_exc.resume()
assert str(caught.value) == "CantPickleThis('detail',)"
def test_unpickleable_exception_when_hiding_setuptools(self):
"""
As revealed in #440, an infinite recursion can occur if an unpickleable
exception while setuptools is hidden. Ensure this doesn't happen.
"""
sandbox = setuptools.sandbox
with sandbox.save_modules():
sandbox.hide_setuptools()
raise sandbox.SandboxViolation('test')
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