diff options
author | Dirk Baechle <dl9obn@darc.de> | 2014-08-24 12:04:48 +0200 |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2014-08-24 12:04:48 +0200 |
commit | 1930f1b34740e1b12220c46483d3fb5f9e125aef (patch) | |
tree | b6d4f20ff4de7b7c463d17799411cc81bec5b21e | |
parent | 78a8b1cdcfa5d0fb290cf4569e5b18a4d04c73cf (diff) | |
download | scons-git-1930f1b34740e1b12220c46483d3fb5f9e125aef.tar.gz |
- updated doc string and simplified a comparison, based on PR review comments
-rw-r--r-- | src/engine/SCons/Platform/PlatformTests.py | 11 | ||||
-rw-r--r-- | 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 a507e4e91..ca3080e03 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 a9c80763f..fa6df61c5 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'\\\\') |