MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_no_update

Method test_no_update

Lib/test/test_functools.py:816–829  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

814 self.assertEqual(wrapper.__doc__, 'This is a test')
815
816 def test_no_update(self):
817 def f():
818 """This is a test"""
819 pass
820 f.attr = 'This is also a test'
821 def wrapper():
822 pass
823 functools.update_wrapper(wrapper, f, (), ())
824 self.check_wrapper(wrapper, f, (), ())
825 self.assertEqual(wrapper.__name__, 'wrapper')
826 self.assertNotEqual(wrapper.__qualname__, f.__qualname__)
827 self.assertEqual(wrapper.__doc__, None)
828 self.assertEqual(wrapper.__annotations__, {})
829 self.assertNotHasAttr(wrapper, 'attr')
830
831 def test_selective_update(self):
832 def f():

Callers

nothing calls this directly

Calls 4

check_wrapperMethod · 0.95
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45
assertNotHasAttrMethod · 0.45

Tested by

no test coverage detected