diff options
author | Steven Knight <knight@baldmt.com> | 2002-01-23 22:59:58 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-01-23 22:59:58 (GMT) |
commit | 315a82d5e0154f6ed33b6848c454c3df61460ea1 (patch) | |
tree | 276a3173660b7626ea7dd446a9aba014a81f2afa /test/exceptions.py | |
parent | 1f0c49dc905310ce09cc790ba2d2b438d07fd846 (diff) | |
download | SCons-315a82d5e0154f6ed33b6848c454c3df61460ea1.zip SCons-315a82d5e0154f6ed33b6848c454c3df61460ea1.tar.gz SCons-315a82d5e0154f6ed33b6848c454c3df61460ea1.tar.bz2 |
Provide a traceback if a Python-function builder throws an exception (Crain).
Diffstat (limited to 'test/exceptions.py')
-rw-r--r-- | test/exceptions.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/exceptions.py b/test/exceptions.py index e67cec6..8fc5348 100644 --- a/test/exceptions.py +++ b/test/exceptions.py @@ -27,8 +27,9 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import sys import TestSCons +import TestCmd -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestCmd.match_re) test.write('SConstruct', """ def func(source = None, target = None, env = None): @@ -40,6 +41,16 @@ env.B(target = 'foo.out', source = 'foo.in') test.write('foo.in', "foo.in\n") -test.run(arguments = "foo.out", stderr = "scons: *** [foo.out] Exception\n") - +test.run(arguments = "foo.out", stderr = """scons: \*\*\* \[foo.out\] Exception +Traceback \((most recent call|innermost) last\): + File ".+", line \d+, in .+ + .+ + File ".+", line \d+, in .+ + .+ + File ".+", line \d+, in .+ + .+ + File "SConstruct", line 3, in func + raise "func exception" +func exception +""") test.pass_test() |