summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
committerStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
commit1a1a11122ad28df19d305af879ba79a2b08ce7d4 (patch)
tree4464eb544fe0cc698ea4d1c5789e19770b83cd6f /test
parent9f36c5b899b8d2d54cae8d3da76b01308c144ed6 (diff)
downloadSCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.zip
SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.gz
SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.bz2
Made former 2to3 changes Python 2.7 compatible (or removed unneeded changes).
Diffstat (limited to 'test')
-rw-r--r--test/AS/nasm.py2
-rw-r--r--test/Actions/unicode-signature.py12
-rw-r--r--test/AddOption/help.py1
-rw-r--r--test/Configure/ConfigureDryRunError.py1
-rw-r--r--test/Configure/config-h.py1
-rw-r--r--test/Configure/implicit-cache.py1
-rw-r--r--test/Deprecated/SourceCode/BitKeeper/BitKeeper.py1
-rw-r--r--test/Deprecated/SourceCode/Subversion.py1
-rw-r--r--test/GetBuildFailures/parallel.py1
-rw-r--r--test/Glob/glob-libpath.py1
-rw-r--r--test/Interactive/version.py1
-rw-r--r--test/Java/multi-step.py1
-rw-r--r--test/MSVC/msvc.py1
-rw-r--r--test/QT/QTFLAGS.py2
-rw-r--r--test/QT/copied-env.py1
-rw-r--r--test/QT/warnings.py1
-rw-r--r--test/Scanner/unicode.py20
-rw-r--r--test/TEX/TEX.py1
-rw-r--r--test/Value.py1
-rw-r--r--test/Win32/bad-drive.py1
-rw-r--r--test/Win32/default-drive.py1
-rw-r--r--test/gnutools.py1
-rw-r--r--test/import.py1
-rw-r--r--test/option--random.py1
-rw-r--r--test/option-v.py1
-rw-r--r--test/option/debug-count.py1
-rw-r--r--test/option/debug-time.py2
-rw-r--r--test/option/help-options.py1
-rw-r--r--test/option/profile.py4
-rw-r--r--test/site_scons/sysdirs.py1
-rw-r--r--test/update-release-info/update-release-info.py2
31 files changed, 47 insertions, 21 deletions
diff --git a/test/AS/nasm.py b/test/AS/nasm.py
index 551a5ab..be7db3e 100644
--- a/test/AS/nasm.py
+++ b/test/AS/nasm.py
@@ -69,7 +69,7 @@ else:
# anyway...).
nasm_format = 'elf'
format_map = {}
-for k, v in list(format_map.items()):
+for k, v in format_map.items():
if sys.platform.find(k) != -1:
nasm_format = v
break
diff --git a/test/Actions/unicode-signature.py b/test/Actions/unicode-signature.py
index 0ba50c3..d91bfa8 100644
--- a/test/Actions/unicode-signature.py
+++ b/test/Actions/unicode-signature.py
@@ -35,12 +35,12 @@ import TestSCons
test = TestSCons.TestSCons()
-try:
- str
-except NameError:
- import sys
- msg = "Unicode not supported by Python version %s; skipping test\n"
- test.skip_test(msg % sys.version[:3])
+## try:
+## unicode
+## except NameError:
+## import sys
+## msg = "Unicode not supported by Python version %s; skipping test\n"
+## test.skip_test(msg % sys.version[:3])
test.write('SConstruct', """
fnode = File(u'foo.txt')
diff --git a/test/AddOption/help.py b/test/AddOption/help.py
index a3fd7be..7b886cb 100644
--- a/test/AddOption/help.py
+++ b/test/AddOption/help.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Configure/ConfigureDryRunError.py b/test/Configure/ConfigureDryRunError.py
index a8c6309..fa85042 100644
--- a/test/Configure/ConfigureDryRunError.py
+++ b/test/Configure/ConfigureDryRunError.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Configure/config-h.py b/test/Configure/config-h.py
index 6c70c9c..ed95055 100644
--- a/test/Configure/config-h.py
+++ b/test/Configure/config-h.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Configure/implicit-cache.py b/test/Configure/implicit-cache.py
index 059fd4c..1a9ff34 100644
--- a/test/Configure/implicit-cache.py
+++ b/test/Configure/implicit-cache.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Deprecated/SourceCode/BitKeeper/BitKeeper.py b/test/Deprecated/SourceCode/BitKeeper/BitKeeper.py
index 9a36eac..2959736 100644
--- a/test/Deprecated/SourceCode/BitKeeper/BitKeeper.py
+++ b/test/Deprecated/SourceCode/BitKeeper/BitKeeper.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Deprecated/SourceCode/Subversion.py b/test/Deprecated/SourceCode/Subversion.py
index ac3eb57..7d45a8c 100644
--- a/test/Deprecated/SourceCode/Subversion.py
+++ b/test/Deprecated/SourceCode/Subversion.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/GetBuildFailures/parallel.py b/test/GetBuildFailures/parallel.py
index 101c2e2..e746d53 100644
--- a/test/GetBuildFailures/parallel.py
+++ b/test/GetBuildFailures/parallel.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
"""
Verify that a failed build action with -j works as expected.
diff --git a/test/Glob/glob-libpath.py b/test/Glob/glob-libpath.py
index 6ee06e6..0878090 100644
--- a/test/Glob/glob-libpath.py
+++ b/test/Glob/glob-libpath.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Interactive/version.py b/test/Interactive/version.py
index 295b9d3..34f8825 100644
--- a/test/Interactive/version.py
+++ b/test/Interactive/version.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
diff --git a/test/Java/multi-step.py b/test/Java/multi-step.py
index add4208..44ebd31 100644
--- a/test/Java/multi-step.py
+++ b/test/Java/multi-step.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/MSVC/msvc.py b/test/MSVC/msvc.py
index 6f5c8d6..a70ed67 100644
--- a/test/MSVC/msvc.py
+++ b/test/MSVC/msvc.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/QT/QTFLAGS.py b/test/QT/QTFLAGS.py
index b7172fc..008397a 100644
--- a/test/QT/QTFLAGS.py
+++ b/test/QT/QTFLAGS.py
@@ -147,7 +147,7 @@ test.must_exist(['work1', 'mmmmocFromH.cxx'],
['work1', 'mmmanother_ui_file.cxx'])
def _flagTest(test,fileToContentsStart):
- for f,c in list(fileToContentsStart.items()):
+ for f,c in fileToContentsStart.items():
if test.read(test.workpath('work1', f)).find(c) != 0:
return 1
return 0
diff --git a/test/QT/copied-env.py b/test/QT/copied-env.py
index 59a344d..3989143 100644
--- a/test/QT/copied-env.py
+++ b/test/QT/copied-env.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/QT/warnings.py b/test/QT/warnings.py
index 5e680f6..a1cf221 100644
--- a/test/QT/warnings.py
+++ b/test/QT/warnings.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Scanner/unicode.py b/test/Scanner/unicode.py
index 7a72804..2737f7d 100644
--- a/test/Scanner/unicode.py
+++ b/test/Scanner/unicode.py
@@ -35,12 +35,12 @@ _python_ = TestSCons._python_
test = TestSCons.TestSCons()
-try:
- str
-except NameError:
- import sys
- msg = "Unicode not supported by Python version %s; skipping test\n"
- test.skip_test(msg % sys.version[:3])
+## try:
+## unicode
+## except NameError:
+## import sys
+## msg = "Unicode not supported by Python version %s; skipping test\n"
+## test.skip_test(msg % sys.version[:3])
import codecs
@@ -102,28 +102,28 @@ include utf16be.k
foo.k 1 line 4
""")
-contents = str("""\
+contents = (u"""\
ascii.k 1 line 1
include ascii.inc
ascii.k 1 line 3
""")
test.write('ascii.k', contents.encode('ascii'))
-contents = str("""\
+contents = (u"""\
utf8.k 1 line 1
include utf8.inc
utf8.k 1 line 3
""")
test.write('utf8.k', codecs.BOM_UTF8 + contents.encode('utf-8'))
-contents = str("""\
+contents = (u"""\
utf16le.k 1 line 1
include utf16le.inc
utf16le.k 1 line 3
""")
test.write('utf16le.k', codecs.BOM_UTF16_LE + contents.encode('utf-16-le'))
-contents = str("""\
+contents = (u"""\
utf16be.k 1 line 1
include utf16be.inc
utf16be.k 1 line 3
diff --git a/test/TEX/TEX.py b/test/TEX/TEX.py
index 863144d..b749690 100644
--- a/test/TEX/TEX.py
+++ b/test/TEX/TEX.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Value.py b/test/Value.py
index 025c6de..7abe758 100644
--- a/test/Value.py
+++ b/test/Value.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/Win32/bad-drive.py b/test/Win32/bad-drive.py
index ff98b4e..4d0d6e9 100644
--- a/test/Win32/bad-drive.py
+++ b/test/Win32/bad-drive.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
"""
This test verifies (on Windows systems) that we fail gracefully and
diff --git a/test/Win32/default-drive.py b/test/Win32/default-drive.py
index 2bc14b1..31253e4 100644
--- a/test/Win32/default-drive.py
+++ b/test/Win32/default-drive.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
"""
This test verifies (on Windows systems) that specifying an
diff --git a/test/gnutools.py b/test/gnutools.py
index f79efe4..b0ebc1c 100644
--- a/test/gnutools.py
+++ b/test/gnutools.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/import.py b/test/import.py
index fb8a28c..d1e1ecf 100644
--- a/test/import.py
+++ b/test/import.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option--random.py b/test/option--random.py
index 59592cb..357cf2e 100644
--- a/test/option--random.py
+++ b/test/option--random.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option-v.py b/test/option-v.py
index 8985db0..43245da 100644
--- a/test/option-v.py
+++ b/test/option-v.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option/debug-count.py b/test/option/debug-count.py
index 076d7fa..ce79086 100644
--- a/test/option/debug-count.py
+++ b/test/option/debug-count.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option/debug-time.py b/test/option/debug-time.py
index 7448e1c..7dd17fe 100644
--- a/test/option/debug-time.py
+++ b/test/option/debug-time.py
@@ -20,7 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+from __future__ import division, print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option/help-options.py b/test/option/help-options.py
index 1b23cb3..e14eff2 100644
--- a/test/option/help-options.py
+++ b/test/option/help-options.py
@@ -20,6 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/option/profile.py b/test/option/profile.py
index 513da47..97f84db 100644
--- a/test/option/profile.py
+++ b/test/option/profile.py
@@ -21,6 +21,8 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from six import u
+
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
@@ -36,7 +38,7 @@ else:
# when we drop support for Python 2.6.
class StringIO(_StringIO):
def write(self, s):
- _StringIO.write(self, str(s))
+ _StringIO.write(self, u(s))
import TestSCons
diff --git a/test/site_scons/sysdirs.py b/test/site_scons/sysdirs.py
index d05f6a4..87f448d 100644
--- a/test/site_scons/sysdirs.py
+++ b/test/site_scons/sysdirs.py
@@ -21,6 +21,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
+from __future__ import print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
diff --git a/test/update-release-info/update-release-info.py b/test/update-release-info/update-release-info.py
index 0db65ba..d3125c7 100644
--- a/test/update-release-info/update-release-info.py
+++ b/test/update-release-info/update-release-info.py
@@ -201,7 +201,7 @@ RELEASE 2.0.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
""", mode = 'r')
-years = ', '.join(map(str, list(range(2001, this_year + 1))))
+years = ', '.join(map(str, range(2001, this_year + 1)))
test.must_match(SConstruct, """
month_year = 'MONTH YEAR'
copyright_years = %s