diff options
author | Steven Knight <knight@baldmt.com> | 2001-09-16 04:22:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-09-16 04:22:19 (GMT) |
commit | e88681240924e70ec12abaf3664290a69db6dcfd (patch) | |
tree | 136311c7b231f8d467156a9ae4a9d53428f364fc /test/errors.py | |
parent | fcd916513a1ad10e13479d4d604f239f7ea45c73 (diff) | |
download | SCons-e88681240924e70ec12abaf3664290a69db6dcfd.zip SCons-e88681240924e70ec12abaf3664290a69db6dcfd.tar.gz SCons-e88681240924e70ec12abaf3664290a69db6dcfd.tar.bz2 |
Add more information error reporting from tests.
Diffstat (limited to 'test/errors.py')
-rw-r--r-- | test/errors.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/test/errors.py b/test/errors.py index 09a741b..cff8087 100644 --- a/test/errors.py +++ b/test/errors.py @@ -7,14 +7,14 @@ import TestSCons test = TestSCons.TestSCons() test.write('SConstruct1', """ -a ! int(2.0) +a ! x """) -test.run(arguments='-f SConstruct1') -test.fail_test(test.stderr() != """ File "SConstruct1", line 2 - a ! int(2.0) +test.run(arguments='-f SConstruct1', stderr = """ File "SConstruct1", line 2 - ^ + a ! x + + \^ SyntaxError: invalid syntax @@ -24,18 +24,15 @@ SyntaxError: invalid syntax test.write('SConstruct2', """ raise UserError, 'Depends() require both sources and targets.' """) -test.run(arguments='-f SConstruct2') -test.fail_test(test.stderr() != """ -SCons error: Depends() require both sources and targets. -File "SConstruct2", line 2, in ? +test.run(arguments='-f SConstruct2', stderr = """ +SCons error: Depends\(\) require both sources and targets. +File "SConstruct2", line 2, in \? """) - test.write('SConstruct3', """ raise InternalError, 'error inside' """) -test.run(arguments='-f SConstruct3') -expect = r"""Traceback \((most recent call|innermost) last\): +test.run(arguments='-f SConstruct3', stderr = r"""Traceback \((most recent call|innermost) last\): File ".*scons\.py", line \d+, in \? main\(\) File ".*scons\.py", line \d+, in main @@ -43,7 +40,6 @@ expect = r"""Traceback \((most recent call|innermost) last\): File "SConstruct3", line \d+, in \? raise InternalError, 'error inside' InternalError: error inside -""" -test.fail_test(not test.match_re(test.stderr(), expect)) +""") test.pass_test() |