diff options
author | tarek <none@none> | 2009-12-04 11:20:36 +0100 |
---|---|---|
committer | tarek <none@none> | 2009-12-04 11:20:36 +0100 |
commit | f7279ede282b895e789b05ababb65ba4f6436160 (patch) | |
tree | 0714be9fb1fb446659d29843e2a5ccebfc9888b7 /setuptools/tests/test_sandbox.py | |
parent | ca0105cf105e6d8a6c3e552c82650de93dbe13b1 (diff) | |
download | external_python_setuptools-f7279ede282b895e789b05ababb65ba4f6436160.tar.gz external_python_setuptools-f7279ede282b895e789b05ababb65ba4f6436160.tar.bz2 external_python_setuptools-f7279ede282b895e789b05ababb65ba4f6436160.zip |
Allowing 'os.devnull' in Sandbox, fixes #101
--HG--
branch : distribute
extra : rebase_source : d6f63794621874eb637139f353314256e02e02df
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) + |