diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-05-21 11:42:04 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-05-21 11:52:32 -0400 |
commit | 20567bef2a36b259d2209cc76fd11a61ad288853 (patch) | |
tree | e70e86c5d21e5399c7999cb2c36ab6404780e06d /setuptools/tests/test_sandbox.py | |
parent | d48cb39b4666477da1d954d3604023095c233869 (diff) | |
download | external_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.py | 4 |
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): |