diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-03-25 04:14:28 (GMT) |
commit | 22d352500f1cd6bd0c53d788a5dc44a1fefa676e (patch) | |
tree | 0984fd581082c27cfbfbb7f94d5751b0e6fd2741 /test/Errors | |
parent | 75ac32ac8e32076e25b72a19eb56340cc585fa4e (diff) | |
download | SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.zip SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.gz SCons-22d352500f1cd6bd0c53d788a5dc44a1fefa676e.tar.bz2 |
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.py | 2 | ||||
-rw-r--r-- | test/Errors/UserError.py | 2 | ||||
-rw-r--r-- | test/Errors/execute-a-directory.py | 3 | ||||
-rw-r--r-- | test/Errors/non-executable-file.py | 3 | ||||
-rw-r--r-- | test/Errors/nonexistent-executable.py | 3 |
5 files changed, 5 insertions, 8 deletions
diff --git a/test/Errors/InternalError.py b/test/Errors/InternalError.py index 032c7a7..49d9fdd 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 c534ed6..0212a52 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 e02dcb0..bf2c246 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 dc6b606..e51dc85 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 ab6d118..1272e81 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), |