MCPcopy Index your code
hub / github.com/python/cpython / test_no_update

Method test_no_update

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

Source from the content-addressed store, hash-verified

998 self.assertEqual(wrapper.__doc__, 'This is a test')
999
1000 def test_no_update(self):
1001 def f():
1002 """This is a test"""
1003 pass
1004 f.attr = 'This is also a test'
1005 @functools.wraps(f, (), ())
1006 def wrapper():
1007 pass
1008 self.check_wrapper(wrapper, f, (), ())
1009 self.assertEqual(wrapper.__name__, 'wrapper')
1010 self.assertNotEqual(wrapper.__qualname__, f.__qualname__)
1011 self.assertEqual(wrapper.__doc__, None)
1012 self.assertNotHasAttr(wrapper, 'attr')
1013
1014 def test_selective_update(self):
1015 def f():

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected