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

Method test_no_update

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

Source from the content-addressed store, hash-verified

934 self.assertEqual(wrapper.__doc__, 'This is a test')
935
936 def test_no_update(self):
937 def f():
938 """This is a test"""
939 pass
940 f.attr = 'This is also a test'
941 @functools.wraps(f, (), ())
942 def wrapper():
943 pass
944 self.check_wrapper(wrapper, f, (), ())
945 self.assertEqual(wrapper.__name__, 'wrapper')
946 self.assertNotEqual(wrapper.__qualname__, f.__qualname__)
947 self.assertEqual(wrapper.__doc__, None)
948 self.assertNotHasAttr(wrapper, 'attr')
949
950 def test_selective_update(self):
951 def f():

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected