Lines Matching defs:method
81 # Find method in parent class
85 # method object; the getattr() below obtains its underlying function.
100 # method object; the getattr() below obtains its underlying function.
114 # method object; the getattr() below obtains its underlying function.
129 # method object; the getattr() below obtains its underlying function.
148 # method object; the getattr() below obtains its underlying function.
167 # method object; the getattr() below obtains its underlying function.
631 else: self.fail("calling object w/o call method should raise "
985 mro_err_msg = """Cannot create a consistent method resolution
1437 C.method = lambda self: 42
1438 self.assertEqual(a.method(), 42)
1728 self.assertTrue(repr(C.foo.__get__(C())).startswith("<bound method "))
2006 self.assertTrue(repr(C.foo.__get__(C(1))).startswith("<bound method "))
2010 # This test checks error messages in builtin method descriptor.
2015 expected_errmsg = "unbound method set.add() needs an argument"
2067 # It would be nice to have every special method tested here, but I'm
2332 "getter method"
2335 "setter method"
2338 self.assertEqual(prop.__doc__, "getter method")
2458 # Lacks a .keys() method; will be added later.
4280 @support.impl_detail("testing an internal kind of method object")
4282 # Testing __get__ method of METH_CLASS C methods...
4530 # Testing method-wrapper objects...
4531 # <type 'method-wrapper'> did not support any reflection before 2.5
4740 # call a method descriptor
4831 types = ['method', 'member', 'getset', 'wrapper']
4916 def method(self):
4918 self.assertRegex(repr(Foo().method),
4919 r"<bound method .*Foo\.method of <.*Foo object at .*>>")
4923 def method(self):
4928 def method(self):
4934 self.assertRegex(repr(base.method),
4935 r"<bound method .*Base\.method of <.*Base object at .*>>")
4936 self.assertRegex(repr(derived1.method),
4937 r"<bound method .*Base\.method of <.*Derived1 object at .*>>")
4938 self.assertRegex(repr(derived2.method),
4939 r"<bound method .*Derived2\.method of <.*Derived2 object at .*>>")
4940 self.assertRegex(repr(super_d2.method),
4941 r"<bound method .*Base\.method of <.*Derived2 object at .*>>")
4945 def method(cls):
4948 self.assertRegex(repr(foo.method), # access via instance
4949 r"<bound method .*Foo\.method of <class '.*Foo'>>")
4950 self.assertRegex(repr(Foo.method), # access via the class
4951 r"<bound method .*Foo\.method of <class '.*Foo'>>")
4959 method = types.MethodType(func, instance)
4960 self.assertRegex(repr(method),
4961 r"<bound method \? of <object object at .*>>")
4963 self.assertRegex(repr(method),
4964 r"<bound method name of <object object at .*>>")
4966 self.assertRegex(repr(method),
4967 r"<bound method qualname of <object object at .*>>")
5298 """Utility method to verify if two objects are copies of each others.
5308 "override the __repr__ method.")
5325 """Utility method to generate the many possible pickle configurations.