diff options
| author | Greg Noel <GregNoel@tigris.org> | 2010-04-15 00:02:59 (GMT) |
|---|---|---|
| committer | Greg Noel <GregNoel@tigris.org> | 2010-04-15 00:02:59 (GMT) |
| commit | 9931fe6c59d330d0dbeea1c51456e3a9f94377d8 (patch) | |
| tree | 0e17c9808475e40bfad54db43529ad01d411e6c2 /src/engine/SCons/Variables/PathVariableTests.py | |
| parent | 12ec17eedc70ee82421b27ff7dd84e947d4e6953 (diff) | |
| download | SCons-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 'src/engine/SCons/Variables/PathVariableTests.py')
| -rw-r--r-- | src/engine/SCons/Variables/PathVariableTests.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/SCons/Variables/PathVariableTests.py b/src/engine/SCons/Variables/PathVariableTests.py index 1643252..084154b 100644 --- a/src/engine/SCons/Variables/PathVariableTests.py +++ b/src/engine/SCons/Variables/PathVariableTests.py @@ -68,7 +68,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'Path for option X does not exist: %s' % dne, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") def test_PathIsDir(self): """Test the PathIsDir validator""" @@ -92,7 +92,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'Directory path for option X is a file: %s' % f, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") dne = test.workpath('does_not_exist') try: @@ -100,7 +100,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'Directory path for option X does not exist: %s' % dne, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") def test_PathIsDirCreate(self): """Test the PathIsDirCreate validator""" @@ -125,7 +125,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'Path for option X is a file, not a directory: %s' % f, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") def test_PathIsFile(self): """Test the PathIsFile validator""" @@ -149,7 +149,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'File path for option X does not exist: %s' % d, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") dne = test.workpath('does_not_exist') try: @@ -157,7 +157,7 @@ class PathVariableTestCase(unittest.TestCase): except SCons.Errors.UserError, e: assert str(e) == 'File path for option X does not exist: %s' % dne, e except: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") def test_PathAccept(self): """Test the PathAccept validator""" @@ -202,10 +202,10 @@ class PathVariableTestCase(unittest.TestCase): expect = 'Path for option X does not exist: %s' % dne assert str(e) == expect, e else: - raise "did not catch expected UserError" + raise Exception("did not catch expected UserError") def my_validator(key, val, env): - raise Exception, "my_validator() got called for %s, %s!" % (key, val) + raise Exception("my_validator() got called for %s, %s!" % (key, val)) opts = SCons.Variables.Variables() opts.Add(SCons.Variables.PathVariable('test2', @@ -220,7 +220,7 @@ class PathVariableTestCase(unittest.TestCase): except Exception, e: assert str(e) == 'my_validator() got called for Y, value!', e else: - raise "did not catch expected exception from my_validator()" + raise Exception("did not catch expected exception from my_validator()") |
