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

Method shortDescription

Lib/unittest/case.py:514–522  ·  view source on GitHub ↗

Returns a one-line description of the test, or None if no description has been provided. The default implementation of this method returns the first line of the specified test method's docstring.

(self)

Source from the content-addressed store, hash-verified

512 return result.TestResult()
513
514 def shortDescription(self):
515 """Returns a one-line description of the test, or None if no
516 description has been provided.
517
518 The default implementation of this method returns the first line of
519 the specified test method's docstring.
520 """
521 doc = self._testMethodDoc
522 return doc.strip().split("\n")[0].strip() if doc else None
523
524
525 def id(self):

Calls 2

stripMethod · 0.45
splitMethod · 0.45