def test_docstring(self): prim = TestPrimitive() prim.__docstring__ = "Some documentation" with utils.capture() as out: glob.doc(prim) self.assertEqual('-----------------\nSome documentation\n', out[0])
def test_docstring_None(self): with utils.capture() as out: glob.doc(TestPrimitive()) self.assertEqual('', out[0])