Home
last modified time | relevance | path

Searched refs:setattr (Results 1 – 25 of 221) sorted by relevance

123456789

/third_party/python/Lib/ctypes/test/
Dtest_strings.py25 self.assertRaises(ValueError, setattr, buf, "value", b"aaaaaaaa")
26 self.assertRaises(TypeError, setattr, buf, "value", 42)
34 self.assertRaises(TypeError, setattr, buf, "value", memoryview(b"Hello, World"))
35 self.assertRaises(TypeError, setattr, buf, "value", memoryview(b"abc"))
36 self.assertRaises(ValueError, setattr, buf, "raw", memoryview(b"x" * 100))
43 self.assertRaises(TypeError, setattr, buf, "value", memoryview(b"abc"))
44 self.assertRaises(ValueError, setattr, buf, "raw", memoryview(b"x" * 100))
148 self.assertRaises(ValueError, setattr, cs, "value", "123456789012345")
151 self.assertRaises(ValueError, setattr, cs, "value", "1234567")
196 self.assertRaises(ValueError, setattr, cs, "value", "123456789012345")
[all …]
Dtest_struct_fields.py20 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
25 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
31 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
38 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
45 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
47 self.assertRaises(AttributeError, setattr, X, "_fields_", [])
Dtest_stringptr.py30 self.assertRaises(TypeError, setattr, x, "str", "Hello, World")
43 self.assertRaises(TypeError, setattr, x, b"str", b)
/third_party/protobuf/python/
Dstubout.py97 setattr(orig_obj, attr_name, new_attr)
108 setattr(*args)
129 setattr(parent, child_name, new_child)
142 setattr(parent, child_name, old_child)
/third_party/python/Lib/test/
Dtest_uuid.py298 badtype(lambda: setattr(u, 'hex', h))
299 badtype(lambda: setattr(u, 'bytes', b))
300 badtype(lambda: setattr(u, 'bytes_le', b))
301 badtype(lambda: setattr(u, 'fields', f))
302 badtype(lambda: setattr(u, 'int', i))
303 badtype(lambda: setattr(u, 'time_low', 0))
304 badtype(lambda: setattr(u, 'time_mid', 0))
305 badtype(lambda: setattr(u, 'time_hi_version', 0))
306 badtype(lambda: setattr(u, 'time_hi_version', 0))
307 badtype(lambda: setattr(u, 'clock_seq_hi_variant', 0))
[all …]
Dtest_structmembers.py37 self.assertRaises(TypeError, setattr, ts, 'T_BOOL', 1)
109 self.assertRaises(TypeError, setattr, ts, attr, nonint)
113 self.assertRaises(TypeError, setattr, ts, "T_STRING_INPLACE", "s")
Dtest_decimal.py926 setattr(E, lop, lambda self, other: 'str' + lop + str(other))
927 setattr(E, rop, lambda self, other: str(other) + rop + 'str')
2671 self.assertRaises(AttributeError, setattr, x, 'real', 100)
2672 self.assertRaises(AttributeError, setattr, x, 'imag', 100)
2673 self.assertRaises(AttributeError, setattr, x, 'conjugate', 100)
2674 self.assertRaises(AttributeError, setattr, x, '__complex__', 100)
2867 self.assertRaises(TypeError, setattr, c, 'rounding', s)
2870 self.assertRaises(TypeError, setattr, c, 'rounding', s)
4082 setattr(c, attr, 999999)
4084 self.assertRaises(ValueError, setattr, c, attr, -1)
[all …]
/third_party/python/Lib/distutils/
Ddist.py152 setattr(self, attr, 0)
162 setattr(self, method_name, getattr(self.metadata, method_name))
269 setattr(self.metadata, key, val)
271 setattr(self, key, val)
429 setattr(self, alias, not strtobool(val))
431 setattr(self, opt, strtobool(val))
433 setattr(self, opt, val)
619 setattr(self.metadata, attr, value)
904 setattr(command_obj, neg_opt[option], not strtobool(value))
906 setattr(command_obj, option, strtobool(value))
[all …]
Dcmd.py210 setattr(self, option, default)
233 setattr(self, option, re.split(r',\s*|\s+', val))
290 setattr(self, dst_option, getattr(src_cmd_obj, src_option))
Dtext_file.py90 setattr(self, opt, options[opt])
92 setattr(self, opt, self.default_options[opt])
/third_party/python/Lib/unittest/test/
Dtest_program.py202 setattr(program, attr, None)
207 setattr(program, attr, false)
212 setattr(program, attr, true)
219 setattr(program, attr, None)
223 setattr(program, attr, False)
229 setattr(program, attr, True)
/third_party/python/PC/layout/support/
Doptions.py115 setattr(ns, k2, value)
117 setattr(ns, k1, value)
/third_party/python/Lib/
Doptparse.py616 setattr(self, attr, attrs[attr])
620 setattr(self, attr, NO_DEFAULT)
622 setattr(self, attr, None)
789 setattr(values, dest, value)
791 setattr(values, dest, self.const)
793 setattr(values, dest, True)
795 setattr(values, dest, False)
801 setattr(values, dest, values.ensure_value(dest, 0) + 1)
828 setattr(self, attr, val)
854 setattr(self, attr, dval)
[all …]
/third_party/selinux/libsepol/tests/policies/test-hooks/
Dcmp_policy.conf71 setattr
98 setattr
127 setattr
Dsmall-base.conf71 setattr
98 setattr
127 setattr
/third_party/selinux/libsepol/tests/policies/test-expander/
Duser-base.conf71 setattr
98 setattr
127 setattr
Drole-base.conf71 setattr
98 setattr
127 setattr
Dalias-base.conf71 setattr
98 setattr
127 setattr
/third_party/protobuf/python/google/protobuf/internal/
Dkeywords_test.py64 setattr(message, 'if', 123)
65 setattr(message, 'as', 1)
/third_party/selinux/libsepol/tests/policies/test-deps/
Dbase-notmetreq.conf70 setattr
97 setattr
126 setattr
Dsmall-base.conf71 setattr
98 setattr
127 setattr
Dbase-metreq.conf71 setattr
98 setattr
127 setattr
/third_party/python/Lib/distutils/command/
Dinstall.py484 setattr(self, attrname, scheme[key])
493 setattr(self, attr, val)
510 setattr(self, attr, convert_path(getattr(self, attr)))
550 setattr(self, attr, change_root(self.root, getattr(self, attr)))
/third_party/selinux/libsepol/tests/policies/test-linker/
Dsmall-base.conf71 setattr
98 setattr
127 setattr
/third_party/protobuf/python/google/protobuf/
Dservice_reflection.py170 setattr(cls, method.name, self._GenerateNonImplementedMethod(method))
279 setattr(cls, method.name, self._GenerateStubMethod(method))

123456789