summaryrefslogtreecommitdiff
path: root/test/Errors
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 +0000
committerGreg Noel <GregNoel@tigris.org>2010-03-25 04:14:28 +0000
commitaf6d7c35464bb75dcabc72094b4bd84154dde50d (patch)
tree0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/Errors
parent55ef7fe83e3211be3045f089767ca8e198db1c2c (diff)
downloadscons-af6d7c35464bb75dcabc72094b4bd84154dde50d.tar.gz
Move 2.0 changes collected in branches/pending back to trunk for further
development. Note that this set of changes is NOT backward-compatible; the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
Diffstat (limited to 'test/Errors')
-rw-r--r--test/Errors/InternalError.py2
-rw-r--r--test/Errors/UserError.py2
-rw-r--r--test/Errors/execute-a-directory.py3
-rw-r--r--test/Errors/non-executable-file.py3
-rw-r--r--test/Errors/nonexistent-executable.py3
5 files changed, 5 insertions, 8 deletions
diff --git a/test/Errors/InternalError.py b/test/Errors/InternalError.py
index 032c7a72..49d9fdd8 100644
--- a/test/Errors/InternalError.py
+++ b/test/Errors/InternalError.py
@@ -35,7 +35,7 @@ test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
# Test InternalError.
test.write('SConstruct', """
-assert not globals().has_key("InternalError")
+assert "InternalError" not in globals()
from SCons.Errors import InternalError
raise InternalError, 'error inside'
""")
diff --git a/test/Errors/UserError.py b/test/Errors/UserError.py
index c534ed60..0212a528 100644
--- a/test/Errors/UserError.py
+++ b/test/Errors/UserError.py
@@ -34,7 +34,7 @@ import TestSCons
test = TestSCons.TestSCons(match = TestSCons.match_re_dotall)
test.write('SConstruct', """
-assert not globals().has_key("UserError")
+assert "UserError" not in globals()
import SCons.Errors
raise SCons.Errors.UserError, 'Depends() requires both sources and targets.'
""")
diff --git a/test/Errors/execute-a-directory.py b/test/Errors/execute-a-directory.py
index e02dcb05..bf2c2462 100644
--- a/test/Errors/execute-a-directory.py
+++ b/test/Errors/execute-a-directory.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -41,7 +40,7 @@ test.write('SConstruct', r"""
bld = Builder(action = '%s $SOURCES $TARGET')
env = Environment(BUILDERS = { 'bld' : bld })
env.bld(target = 'f3', source = 'f3.in')
-""" % string.replace(test.workdir, '\\', '\\\\'))
+""" % test.workdir.replace('\\', '\\\\'))
test.run(arguments='.',
stdout = test.wrap_stdout("%s f3.in f3\n" % test.workdir, error=1),
diff --git a/test/Errors/non-executable-file.py b/test/Errors/non-executable-file.py
index dc6b6063..e51dc85c 100644
--- a/test/Errors/non-executable-file.py
+++ b/test/Errors/non-executable-file.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -72,7 +71,7 @@ test.write('SConstruct', r"""
bld = Builder(action = '%s $SOURCES $TARGET')
env = Environment(BUILDERS = { 'bld': bld })
env.bld(target = 'f1', source = 'f1.in')
-""" % string.replace(not_executable, '\\', '\\\\'))
+""" % not_executable.replace('\\', '\\\\'))
test.run(arguments='.',
stdout = test.wrap_stdout("%s f1.in f1\n" % not_executable, error=1),
diff --git a/test/Errors/nonexistent-executable.py b/test/Errors/nonexistent-executable.py
index ab6d1186..1272e818 100644
--- a/test/Errors/nonexistent-executable.py
+++ b/test/Errors/nonexistent-executable.py
@@ -25,7 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import string
import TestSCons
@@ -39,7 +38,7 @@ test.write('SConstruct', r"""
bld = Builder(action = '%s $SOURCES $TARGET')
env = Environment(BUILDERS = { 'bld' : bld })
env.bld(target = 'f1', source = 'f1.in')
-""" % string.replace(no_such_file, '\\', '\\\\'))
+""" % no_such_file.replace('\\', '\\\\'))
test.run(arguments='.',
stdout = test.wrap_stdout("%s f1.in f1\n" % no_such_file, error=1),