From b73d7fa62dae090d486c54c8cc434e955a06ffb6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:19:40 -0400 Subject: Remove unused variable --HG-- extra : rebase_source : c4b515b677e318ffdcd78b2d90ab772e7d1f94e3 --- setuptools/tests/test_sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/tests/test_sandbox.py') diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 06b3d434..0e04ad1c 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 -- cgit v1.2.3 From ca46f074d12651e32250737c7f380b343b0882ec Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:20:32 -0400 Subject: Python 2.3 no longer supported --HG-- extra : rebase_source : debc6141ad369eafeb78b808a15d8558ff3fb83b --- setuptools/tests/test_sandbox.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'setuptools/tests/test_sandbox.py') diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 0e04ad1c..0f2e693d 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -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)) -- cgit v1.2.3 From 33f496c61e086bd1ac701e44bc17315c0442010c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 1 Aug 2014 15:29:11 -0400 Subject: Add test capturing failure on Python 2.6. Ref #236 --HG-- extra : rebase_source : 99a2b1e437691f9e1a9982357bc70d91fce91953 --- setuptools/tests/test_sandbox.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'setuptools/tests/test_sandbox.py') diff --git a/setuptools/tests/test_sandbox.py b/setuptools/tests/test_sandbox.py index 0f2e693d..6a890ebc 100644 --- a/setuptools/tests/test_sandbox.py +++ b/setuptools/tests/test_sandbox.py @@ -73,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() -- cgit v1.2.3