From 1930f1b34740e1b12220c46483d3fb5f9e125aef Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Sun, 24 Aug 2014 12:04:48 +0200 Subject: - updated doc string and simplified a comparison, based on PR review comments --- src/engine/SCons/Platform/PlatformTests.py | 11 ++++------- src/engine/SCons/Platform/__init__.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/engine/SCons/Platform/PlatformTests.py b/src/engine/SCons/Platform/PlatformTests.py index a507e4e..ca3080e 100644 --- a/src/engine/SCons/Platform/PlatformTests.py +++ b/src/engine/SCons/Platform/PlatformTests.py @@ -26,7 +26,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons.compat import collections -import sys import unittest import TestUnit @@ -121,12 +120,10 @@ class PlatformTestCase(unittest.TestCase): assert env != {}, env class TempFileMungeTestCase(unittest.TestCase): - def test_TempFileMunge(self): - """Test the TempFileMunge() class, more specifically the - MAXLINELENGTH setting. - We try setting different maximum line lengths for a - fixed command string and ensure that the tempfile mechanism - kicks in at MAXLINELENGTH+1. + def test_MAXLINELENGTH(self): + """ Test different values for MAXLINELENGTH with the same + size command string to ensure that the temp file mechanism + kicks in only at MAXLINELENGTH+1, or higher """ # Init class with cmd, such that the fully expanded # string reads "a test command line". diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index a9c8076..fa6df61 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -188,7 +188,7 @@ class TempFileMunge(object): (fd, tmp) = tempfile.mkstemp('.lnk', text=True) native_tmp = SCons.Util.get_native_path(os.path.normpath(tmp)) - if env.get('SHELL',None) and env['SHELL'] == 'sh': + if env.get('SHELL',None) == 'sh': # The sh shell will try to escape the backslashes in the # path, so unescape them. native_tmp = native_tmp.replace('\\', r'\\\\') -- cgit v0.12