From 20567bef2a36b259d2209cc76fd11a61ad288853 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 21 May 2017 11:42:04 -0400 Subject: Implement AbstractSandbox as a context manager. --- setuptools/tests/test_sandbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/tests') 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): -- cgit v1.2.3