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

Method test_default_update

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

Source from the content-addressed store, hash-verified

860 return wrapper, f
861
862 def test_default_update(self):
863 wrapper, f = self._default_update()
864 self.check_wrapper(wrapper, f)
865 T, = f.__type_params__
866 self.assertIs(wrapper.__wrapped__, f)
867 self.assertEqual(wrapper.__name__, 'f')
868 self.assertEqual(wrapper.__qualname__, f.__qualname__)
869 self.assertEqual(wrapper.attr, 'This is also a test')
870 self.assertEqual(wrapper.__annotations__['a'], 'This is a new annotation')
871 self.assertNotIn('b', wrapper.__annotations__)
872 self.assertEqual(wrapper.__type_params__, (T,))
873
874 @unittest.skipIf(sys.flags.optimize >= 2,
875 "Docstrings are omitted with -O2 and above")

Callers

nothing calls this directly

Calls 5

_default_updateMethod · 0.95
check_wrapperMethod · 0.95
assertNotInMethod · 0.80
assertIsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected