summaryrefslogtreecommitdiffstats
path: root/test/errors.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-12-20 04:40:12 (GMT)
committerSteven Knight <knight@baldmt.com>2001-12-20 04:40:12 (GMT)
commit8526ba0bb9938ddf3ceca8ca917c77f7b1505f55 (patch)
tree724169956a0e4bef7a271ad4b46d8dca4cee3d2b /test/errors.py
parent98bdd799b0c61d2bf1004a9dc39976e4a31abc9c (diff)
downloadSCons-8526ba0bb9938ddf3ceca8ca917c77f7b1505f55.zip
SCons-8526ba0bb9938ddf3ceca8ca917c77f7b1505f55.tar.gz
SCons-8526ba0bb9938ddf3ceca8ca917c77f7b1505f55.tar.bz2
Fix Export(), add Import() and Return()
Diffstat (limited to 'test/errors.py')
-rw-r--r--test/errors.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/errors.py b/test/errors.py
index 5edd8f9..cb2248d 100644
--- a/test/errors.py
+++ b/test/errors.py
@@ -47,17 +47,21 @@ SyntaxError: invalid syntax
test.write('SConstruct2', """
-raise UserError, 'Depends() require both sources and targets.'
+assert not globals().has_key("UserError")
+import SCons.Errors
+raise SCons.Errors.UserError, 'Depends() require both sources and targets.'
""")
test.run(arguments='-f SConstruct2',
stdout = "",
stderr = """
SCons error: Depends\(\) require both sources and targets.
-File "SConstruct2", line 2, in \?
+File "SConstruct2", line 4, in \?
""")
test.write('SConstruct3', """
+assert not globals().has_key("InternalError")
+from SCons.Errors import InternalError
raise InternalError, 'error inside'
""")
@@ -67,7 +71,9 @@ test.run(arguments='-f SConstruct3',
File ".*Script.py", line \d+, in main
_main\(\)
File ".*Script.py", line \d+, in _main
- exec file in script_env
+ SCons.SConscript.SConscript\(script\)
+ File ".*SConscript.py", line \d+, in SConscript
+ exec file in stack\[-1\].globals
File "SConstruct3", line \d+, in \?
raise InternalError, 'error inside'
InternalError: error inside