aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-10-18 11:11:59 -0400
committerGitHub <noreply@github.com>2016-10-18 11:11:59 -0400
commit7d984bbdc111fcdfef816265e159a3054dbee132 (patch)
tree3a25ce5765a8c9ae633a3eaeec1ce88f7b382e21 /setuptools/tests/test_sandbox.py
parentf774a0be095c3873c2881d393605fefa5ca0d0d6 (diff)
parent31bd37c6ac8de9e8c1bacebc2d8e1215df91eb96 (diff)
downloadexternal_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.tar.gz
external_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.tar.bz2
external_python_setuptools-7d984bbdc111fcdfef816265e159a3054dbee132.zip
Merge pull request #820 from stepshal/blank
Fix quantity of blank lines.
Diffstat (limited to 'setuptools/tests/test_sandbox.py')
-rw-r--r--setuptools/tests/test_sandbox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py
index aa6138e4..b92a477a 100644
--- a/setuptools/tests/test_sandbox.py
+++ b/setuptools/tests/test_sandbox.py
@@ -11,7 +11,6 @@ from setuptools.sandbox import DirectorySandbox
class TestSandbox:
-
def test_devnull(self, tmpdir):
sandbox = DirectorySandbox(str(tmpdir))
sandbox.run(self._file_writer(os.devnull))
@@ -21,6 +20,7 @@ class TestSandbox:
def do_write():
with open(path, 'w') as f:
f.write('xxx')
+
return do_write
def test_win32com(self, tmpdir):
@@ -57,7 +57,6 @@ class TestSandbox:
class TestExceptionSaver:
-
def test_exception_trapped(self):
with setuptools.sandbox.ExceptionSaver():
raise ValueError("details")
@@ -107,6 +106,7 @@ class TestExceptionSaver:
As revealed in #440, an infinite recursion can occur if an unpickleable
exception while setuptools is hidden. Ensure this doesn't happen.
"""
+
class ExceptionUnderTest(Exception):
"""
An unpickleable exception (not in globals).
@@ -126,10 +126,12 @@ class TestExceptionSaver:
should reflect a proper exception and not be wrapped in
an UnpickleableException.
"""
+
def write_file():
"Trigger a SandboxViolation by writing outside the sandbox"
with open('/etc/foo', 'w'):
pass
+
sandbox = DirectorySandbox(str(tmpdir))
with pytest.raises(setuptools.sandbox.SandboxViolation) as caught:
with setuptools.sandbox.save_modules():