Lines Matching refs:test_attribute_failure

115 def test_attribute_failure(ob, attr_name, new_value, expected_exception):
155 test_attribute_failure(c, "boolean_value", "boo", ValueError)
156 test_attribute_failure(c, "boolean_value", test_base_interface, TypeError)
163 test_attribute_failure(c, "octet_value", "boo", ValueError)
172 test_attribute_failure(c, "short_value", "boo", ValueError)
181 test_attribute_failure(c, "ushort_value", "boo", ValueError)
190 test_attribute_failure(c, "long_value", 0xFFFFL * 0xFFFF, OverflowError) # long int too long to convert
191 test_attribute_failure(c, "long_value", "boo", ValueError)
196 test_attribute_failure(c, "ulong_value", "boo", ValueError)
203 test_attribute_failure(c, "long_long_value", 0xFFFFL * 0xFFFF * 0xFFFF * 0xFFFF, OverflowError) # long int too long to convert
204 test_attribute_failure(c, "long_long_value", "boo", ValueError)
208 test_attribute_failure(c, "ulong_long_value", "boo", ValueError)
209 test_attribute_failure(c, "ulong_long_value", -1, UnsignedMismatchException) # can't convert negative value to unsigned long)
215 test_attribute_failure(c, "float_value", "boo", ValueError)
221 test_attribute_failure(c, "double_value", "boo", ValueError)
225 test_attribute_failure(c, "char_value", "xy", ValueError)
228 test_attribute_failure(c, "char_value", u"xy", ValueError)
232 test_attribute_failure(c, "wchar_value", "hi", ValueError)
235 test_attribute_failure(c, "wchar_value", u"hi", ValueError)
257 test_attribute_failure(c, "no_attribute", "boo", AttributeError)
260 test_attribute_failure(c, "interface_value", 2, TypeError)