diff options
Diffstat (limited to 'setuptools/tests/test_sandbox.py')
-rw-r--r-- | setuptools/tests/test_sandbox.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py new file mode 100644 index 00000000..1b0dc4ea --- /dev/null +++ b/setuptools/tests/test_sandbox.py @@ -0,0 +1,28 @@ +"""develop tests +""" +import sys +import os +import shutil +import unittest +import tempfile + +from setuptools.sandbox import DirectorySandbox + +class TestSandbox(unittest.TestCase): + + def setUp(self): + self.dir = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.dir) + + def test_devnull(self): + sandbox = DirectorySandbox(self.dir) + + def _write(): + f = open(os.devnull, 'w') + f.write('xxx') + f.close() + + sandbox.run(_write) + |