Lines Matching refs:instance

85     instance = m.TestProperties()
87 assert instance.def_readonly == 1
89 instance.def_readonly = 2
91 instance.def_readwrite = 2
92 assert instance.def_readwrite == 2
94 assert instance.def_property_readonly == 2
96 instance.def_property_readonly = 3
98 instance.def_property = 3
99 assert instance.def_property == 3
102 dummy = instance.def_property_writeonly # noqa: F841 unused var
105 instance.def_property_writeonly = 4
106 assert instance.def_property_readonly == 4
109 dummy = instance.def_property_impossible # noqa: F841 unused var
113 instance.def_property_impossible = 5
148 # Static property read and write via instance
149 instance = m.TestProperties()
153 assert instance.def_readwrite_static == 0
155 instance.def_readwrite_static = 2
157 assert instance.def_readwrite_static == 2
160 dummy = instance.def_property_writeonly_static # noqa: F841 unused var
163 instance.def_property_writeonly_static = 4
164 assert instance.def_property_static == 4
174 instance = m.TestProperties()
176 assert instance.static_cls is m.TestProperties
182 instance.static_cls = check_self
206 "overloading a method with both static and instance methods is not supported; " +
215 "overloading a method with both static and instance methods is not supported; " +
217 "error while attempting to bind instance method ExampleMandA.overload_mixed2"
251 instance = m.TestPropRVP()
252 o = instance.rvalue
262 instance = m.DynamicClass()
263 assert not hasattr(instance, "foo")
264 assert "foo" not in dir(instance)
267 instance.foo = 42
268 assert hasattr(instance, "foo")
269 assert instance.foo == 42
270 assert "foo" in dir(instance)
273 assert "foo" in instance.__dict__
274 instance.__dict__ = {"bar": True}
275 assert not hasattr(instance, "foo")
276 assert hasattr(instance, "bar")
279 instance.__dict__ = []
284 del instance
305 instance = m.DynamicClass()
306 instance.circular_reference = instance
310 del instance
458 """#283: __str__ called on uninitialized instance when constructor arguments invalid"""