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

Method test_set_docstring_attr

Lib/test/test_funcattrs.py:399–406  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

397
398class FunctionDocstringTest(FuncAttrsTest):
399 def test_set_docstring_attr(self):
400 self.assertEqual(self.b.__doc__, None)
401 docstr = "A test method that does nothing"
402 self.b.__doc__ = docstr
403 self.F.a.__doc__ = docstr
404 self.assertEqual(self.b.__doc__, docstr)
405 self.assertEqual(self.fi.a.__doc__, docstr)
406 self.cannot_set_attr(self.fi.a, "__doc__", docstr, AttributeError)
407
408 def test_delete_docstring(self):
409 self.b.__doc__ = "The docstring"

Callers

nothing calls this directly

Calls 2

cannot_set_attrMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected