Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/propertiestests.py12
1 files changed, 6 insertions, 6 deletions
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):