aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-09-29 21:14:51 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-09-29 21:14:51 -0400
commit626fa69fb0470710e870628afd0cb7ec0ba96ddf (patch)
treebefcacc09c560133266eb5a1757a45ea43d93453 /setuptools/tests/test_sandbox.py
parent96aed21b42121acde68dd6b3732c3fbae0903569 (diff)
parent9e7f35fec4178dea678693cb768b6076d45e7ddd (diff)
downloadexternal_python_setuptools-626fa69fb0470710e870628afd0cb7ec0ba96ddf.tar.gz
external_python_setuptools-626fa69fb0470710e870628afd0cb7ec0ba96ddf.tar.bz2
external_python_setuptools-626fa69fb0470710e870628afd0cb7ec0ba96ddf.zip
Merge with 6.0.2
--HG-- branch : feature/issue-229
Diffstat (limited to 'setuptools/tests/test_sandbox.py')
-rw-r--r--setuptools/tests/test_sandbox.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py
index 06b3d434..6a890ebc 100644
--- a/setuptools/tests/test_sandbox.py
+++ b/setuptools/tests/test_sandbox.py
@@ -19,7 +19,7 @@ def has_win32com():
if not sys.platform.startswith('win32'):
return False
try:
- mod = __import__('win32com')
+ __import__('win32com')
except ImportError:
return False
return True
@@ -33,8 +33,6 @@ class TestSandbox(unittest.TestCase):
shutil.rmtree(self.dir)
def test_devnull(self):
- if sys.version < '2.4':
- return
sandbox = DirectorySandbox(self.dir)
sandbox.run(self._file_writer(os.devnull))
@@ -75,5 +73,11 @@ class TestSandbox(unittest.TestCase):
setuptools.sandbox._execfile(target, vars(namespace))
assert namespace.result == 'passed'
+ def test_setup_py_with_CRLF(self):
+ setup_py = os.path.join(self.dir, 'setup.py')
+ with open(setup_py, 'wb') as stream:
+ stream.write(b'"degenerate script"\r\n')
+ setuptools.sandbox._execfile(setup_py, globals())
+
if __name__ == '__main__':
unittest.main()