summaryrefslogtreecommitdiffstats
path: root/test/exceptions.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2010-04-15 00:02:59 (GMT)
committerGreg Noel <GregNoel@tigris.org>2010-04-15 00:02:59 (GMT)
commit9931fe6c59d330d0dbeea1c51456e3a9f94377d8 (patch)
tree0e17c9808475e40bfad54db43529ad01d411e6c2 /test/exceptions.py
parent12ec17eedc70ee82421b27ff7dd84e947d4e6953 (diff)
downloadSCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.zip
SCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.tar.gz
SCons-9931fe6c59d330d0dbeea1c51456e3a9f94377d8.tar.bz2
http://scons.tigris.org/issues/show_bug.cgi?id=2345
Apply the first part of the 'raise' fixer (the three-argument cases are not converted and will need to wait until native support of with_traceback() is available).
Diffstat (limited to 'test/exceptions.py')
-rw-r--r--test/exceptions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/exceptions.py b/test/exceptions.py
index 6a68c79..79d869c 100644
--- a/test/exceptions.py
+++ b/test/exceptions.py
@@ -36,7 +36,7 @@ SConstruct_path = test.workpath('SConstruct')
test.write(SConstruct_path, """\
def func(source = None, target = None, env = None):
- raise Exception, "func exception"
+ raise Exception("func exception")
B = Builder(action = func)
env = Environment(BUILDERS = { 'B' : B })
env.B(target = 'foo.out', source = 'foo.in')
@@ -44,7 +44,7 @@ env.B(target = 'foo.out', source = 'foo.in')
test.write('foo.in', "foo.in\n")
-expected_stderr = """scons: \*\*\* \[foo.out\] Exception : func exception
+expected_stderr = r"""scons: \*\*\* \[foo.out\] Exception : func exception
Traceback \((most recent call|innermost) last\):
( File ".+", line \d+, in \S+
[^\n]+
@@ -52,7 +52,7 @@ Traceback \((most recent call|innermost) last\):
)*( File ".+", line \d+, in \S+
[^\n]+
)* File "%s", line 2, in func
- raise Exception, "func exception"
+ raise Exception\("func exception"\)
Exception: func exception
""" % re.escape(SConstruct_path)