From 738149c9bfb9965d013d01ef99f9bb1c2819e7e8 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Tue, 15 Jun 2010 14:28:22 +0000 Subject: Imported Upstream version 2.0.0 --- src/engine/SCons/Variables/PathVariableTests.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/engine/SCons/Variables/PathVariableTests.py') diff --git a/src/engine/SCons/Variables/PathVariableTests.py b/src/engine/SCons/Variables/PathVariableTests.py index 93f2b17..c55a6ed 100644 --- a/src/engine/SCons/Variables/PathVariableTests.py +++ b/src/engine/SCons/Variables/PathVariableTests.py @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PathVariableTests.py 4720 2010/03/24 03:14:11 jars" +__revision__ = "src/engine/SCons/Variables/PathVariableTests.py 5023 2010/06/14 22:05:46 scons" import os.path import sys @@ -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()") -- cgit v1.2.3