aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-05-21 11:42:04 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-05-21 11:52:32 -0400
commit20567bef2a36b259d2209cc76fd11a61ad288853 (patch)
treee70e86c5d21e5399c7999cb2c36ab6404780e06d /setuptools/tests/test_sandbox.py
parentd48cb39b4666477da1d954d3604023095c233869 (diff)
downloadexternal_python_setuptools-20567bef2a36b259d2209cc76fd11a61ad288853.tar.gz
external_python_setuptools-20567bef2a36b259d2209cc76fd11a61ad288853.tar.bz2
external_python_setuptools-20567bef2a36b259d2209cc76fd11a61ad288853.zip
Implement AbstractSandbox as a context manager.
Diffstat (limited to 'setuptools/tests/test_sandbox.py')
-rw-r--r--setuptools/tests/test_sandbox.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py
index 2b3d859e..6b0400f3 100644
--- a/setuptools/tests/test_sandbox.py
+++ b/setuptools/tests/test_sandbox.py
@@ -12,8 +12,8 @@ from setuptools.sandbox import DirectorySandbox
class TestSandbox:
def test_devnull(self, tmpdir):
- sandbox = DirectorySandbox(str(tmpdir))
- sandbox.run(self._file_writer(os.devnull))
+ with DirectorySandbox(str(tmpdir)):
+ self._file_writer(os.devnull)
@staticmethod
def _file_writer(path):