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

Method test_factory_doc_attr

Lib/test/test_collections.py:416–420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

414 @unittest.skipIf(sys.flags.optimize >= 2,
415 "Docstrings are omitted with -O2 and above")
416 def test_factory_doc_attr(self):
417 Point = namedtuple('Point', 'x y')
418 self.assertEqual(Point.__doc__, 'Point(x, y)')
419 Point.__doc__ = '2D point'
420 self.assertEqual(Point.__doc__, '2D point')
421
422 @unittest.skipIf(sys.flags.optimize >= 2,
423 "Docstrings are omitted with -O2 and above")

Callers

nothing calls this directly

Calls 2

namedtupleFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected