diff options
Diffstat (limited to 'SCons/DefaultsTests.py')
-rw-r--r-- | SCons/DefaultsTests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/SCons/DefaultsTests.py b/SCons/DefaultsTests.py index c9a666311..66e219a89 100644 --- a/SCons/DefaultsTests.py +++ b/SCons/DefaultsTests.py @@ -28,6 +28,7 @@ import collections import TestCmd from SCons.Defaults import mkdir_func, _defines, processDefines +from SCons.Errors import UserError class DummyEnvironment(collections.UserDict): @@ -144,6 +145,15 @@ class DefaultsTestCase(unittest.TestCase): rv = processDefines(['foo', ('name', 'val'), ['name2', 'val2']]) self.assertEqual(rv, ['foo', 'name=val', 'name2=val2']) + with self.subTest(): + # invalid tuple + try: + rv = processDefines([('name', 'val', 'bad')]) + except UserError as e: + pass + else: + self.fail("Invalid tuple should throw SCons.Errors.UserError") + if __name__ == "__main__": unittest.main() |