diff options
Diffstat (limited to 'src/engine/SCons/Variables/PathVariableTests.py')
-rw-r--r-- | src/engine/SCons/Variables/PathVariableTests.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/SCons/Variables/PathVariableTests.py b/src/engine/SCons/Variables/PathVariableTests.py index 2e574eb..c8518af 100644 --- a/src/engine/SCons/Variables/PathVariableTests.py +++ b/src/engine/SCons/Variables/PathVariableTests.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001 - 2016 The SCons Foundation +# Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PathVariableTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Variables/PathVariableTests.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import os.path import sys @@ -67,7 +67,7 @@ class PathVariableTestCase(unittest.TestCase): dne = test.workpath('does_not_exist') try: o.validator('X', dne, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'Path for option X does not exist: %s' % dne, e except: raise Exception("did not catch expected UserError") @@ -91,7 +91,7 @@ class PathVariableTestCase(unittest.TestCase): f = test.workpath('file') try: o.validator('X', f, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'Directory path for option X is a file: %s' % f, e except: raise Exception("did not catch expected UserError") @@ -99,7 +99,7 @@ class PathVariableTestCase(unittest.TestCase): dne = test.workpath('does_not_exist') try: o.validator('X', dne, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'Directory path for option X does not exist: %s' % dne, e except: raise Exception("did not catch expected UserError") @@ -124,7 +124,7 @@ class PathVariableTestCase(unittest.TestCase): f = test.workpath('file') try: o.validator('X', f, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'Path for option X is a file, not a directory: %s' % f, e except: raise Exception("did not catch expected UserError") @@ -148,7 +148,7 @@ class PathVariableTestCase(unittest.TestCase): d = test.workpath('d') try: o.validator('X', d, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'File path for option X does not exist: %s' % d, e except: raise Exception("did not catch expected UserError") @@ -156,7 +156,7 @@ class PathVariableTestCase(unittest.TestCase): dne = test.workpath('does_not_exist') try: o.validator('X', dne, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: assert str(e) == 'File path for option X does not exist: %s' % dne, e except: raise Exception("did not catch expected UserError") @@ -200,7 +200,7 @@ class PathVariableTestCase(unittest.TestCase): dne = test.workpath('does_not_exist') try: o.validator('X', dne, {}) - except SCons.Errors.UserError, e: + except SCons.Errors.UserError as e: expect = 'Path for option X does not exist: %s' % dne assert str(e) == expect, e else: @@ -219,7 +219,7 @@ class PathVariableTestCase(unittest.TestCase): try: o.validator('Y', 'value', {}) - except Exception, e: + except Exception as e: assert str(e) == 'my_validator() got called for Y, value!', e else: raise Exception("did not catch expected exception from my_validator()") |