summaryrefslogtreecommitdiff
path: root/test/option
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2009-09-13 22:47:29 +0000
committerWilliam Deegan <bill@baddogconsulting.com>2009-09-13 22:47:29 +0000
commit7581d6c5cd9127f885aeb48d9f1d7d64e42ee072 (patch)
tree2aa143e00338c5d9aa6f7e2447e8a51706bea1ba /test/option
parentb4d417c6a96e17e9c57afc0aa928905708fc0d35 (diff)
downloadscons-7581d6c5cd9127f885aeb48d9f1d7d64e42ee072.tar.gz
Fix test to pass for deprecated python versions. Not what was expected deprecation errors aren't output when --debug=memoizer is on command line, but are when it's passed via SCONSFLAGS.
Diffstat (limited to 'test/option')
-rw-r--r--test/option/debug-memoizer.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/option/debug-memoizer.py b/test/option/debug-memoizer.py
index 5ad4bcf5..0bfc8296 100644
--- a/test/option/debug-memoizer.py
+++ b/test/option/debug-memoizer.py
@@ -82,7 +82,10 @@ expect = [
if use_metaclass:
def run_and_check(test, args, desc,stderr=None):
- test.run(arguments = args,stderr=".*"+TestSCons.deprecated_python_expr)
+ if stderr:
+ test.run(arguments = args,stderr=stderr)
+ else:
+ test.run(arguments = args)
test.must_contain_any_line(test.stdout(), expect)
else:
@@ -93,30 +96,29 @@ scons: warning: memoization is not supported in this version of Python \\(%s\\)
expect_no_metaclasses = expect_no_metaclasses + TestSCons.file_expr
- def run_and_check(test, args, desc):
- test.run(arguments = args, stderr = expect_no_metaclasses+".*"+TestSCons.deprecated_python_expr)
+ def run_and_check(test, args, desc,stderr=None):
+ if stderr:
+ test.run(arguments = args,stderr=expect_no_metaclasses+stderr)
+ else:
+ test.run(arguments = args,stderr=expect_no_metaclasses)
+ #test.run(arguments = args, stderr = expect_no_metaclasses+TestSCons.deprecated_python_expr)
test.must_not_contain_any_line(test.stdout(), expect)
-for args in ['-h --debug=memoizer', '--debug=memoizer']:
- run_and_check(test, args, "command line '%s'" % args)
+for (args,stderr) in [('-h --debug=memoizer',''), ('--debug=memoizer','')]:
+ run_and_check(test, args, "command line '%s'" % args,stderr)
test.must_match('file.out', "file.in\n")
-
-
test.unlink("file.out")
-
-
os.environ['SCONSFLAGS'] = '--debug=memoizer'
-run_and_check(test, '', 'SCONSFLAGS=--debug=memoizer')
+run_and_check(test, '', 'SCONSFLAGS=--debug=memoizer',stderr=TestSCons.deprecated_python_expr)
test.must_match('file.out', "file.in\n")
-
test.pass_test()
# Local Variables: