From 0b1d57718a7e1652a87963549e17b51bd1b449af Mon Sep 17 00:00:00 2001 From: Vincent Vinet Date: Thu, 03 Dec 2009 18:53:09 +0000 Subject: repair the broken properties tests. Now they fail like they should --- (limited to 'tests') diff --git a/tests/propertiestests.py b/tests/propertiestests.py index cb8e884..49d2312 100644 --- a/tests/propertiestests.py +++ b/tests/propertiestests.py @@ -29,28 +29,28 @@ def try_wrong_values(obj): try: obj.prop = 3 assert False, "Able to insert int value in property of type %s"%typ - except: + except ValueError: pass if typ != "float": try: obj.prop = 1.1 assert False, "Able to insert float value in property of type %s"%typ - except: + except ValueError: pass if typ != "string": try: obj.prop = "Fake string" assert False, "Able to insert string value in property of type %s"%typ - except: + except ValueError: pass if typ != "array": try: obj.prop = [1, 2000, 3, 400] assert False, "Able to insert array value in property of type %s"%typ - except: + except ValueError: pass if typ != "color": @@ -58,7 +58,7 @@ def try_wrong_values(obj): obj.prop = [1,2,3] if typ != "array": assert False, "Able to insert color value in property of type %s"%typ - except: + except ValueError: pass if typ != "boolean": @@ -66,7 +66,7 @@ def try_wrong_values(obj): obj.prop = True if typ != "boolean": assert False, "Able to set boolean value in property of type %s"%typ - except: + except ValueError: pass class BasePropertyTest(unittest.TestCase): -- cgit v0.9.1