From 96e5675b0003d57cb87eb44f470aa2d309d8329b Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 05 Dec 2009 19:22:28 +0000 Subject: BoyScout2.0 : Adding type objects support inside the TypeConstraint --- (limited to 'tests') diff --git a/tests/propertiestests.py b/tests/propertiestests.py index 55c3818..8e7e715 100644 --- a/tests/propertiestests.py +++ b/tests/propertiestests.py @@ -655,9 +655,11 @@ class TAddonPropertyTest(unittest.TestCase): try: obj1.addon = wrongAddon() - assert False, "Addon Property should not accept non-TPropContainer values" - except ValueError: + except TypeConstraintError: pass + except: + assert False, "Addon Property should not accept non-TPropContainer values" + class TAddonPropertyList(unittest.TestCase): def test_wrong_value(self): @@ -674,12 +676,12 @@ class TAddonPropertyList(unittest.TestCase): try: obj1.addonlist = klass1() assert False, "TAddonPropeprty shouldn't accept anything else than a list" - except ValueError: + except TypeConstraintError: pass try: obj1.addonlist = [klass1(), klass1(), wrongAddon(), klass1()] - except ValueError: + except TypeConstraintError: pass if __name__ == "__main__": unittest.main() -- cgit v0.9.1