aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_sandbox.py
diff options
context:
space:
mode:
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()