Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/propertiestests.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-12-05 19:22:28 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-12-06 02:53:29 (GMT)
commit3550e7a3feac8726e4747457e14932e6010b397b (patch)
tree33d61509739875b751f346782bf736440652cf41 /tests/propertiestests.py
parent65d4250df69c0601d7e0a6e20839761aec0dab7a (diff)
BoyScout2.0 : Adding type objects support inside the TypeConstraint
Diffstat (limited to 'tests/propertiestests.py')
-rw-r--r--tests/propertiestests.py10
1 files changed, 6 insertions, 4 deletions
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()