def test_oneline(self): s = cleanup_docstring('hello, world') assert s == 'hello, world' s = cleanup_docstring('/** hello, world */') assert s == 'hello, world' s = cleanup_docstring(' /** hello, world */ ') assert s == 'hello, world'
def test_multiline_indented_text(self): s = cleanup_docstring('''/** * yaml: * key0: value0 * key1: value1 */''') assert s == 'yaml:\n key0: value0\n key1: value1'
def test_multiline(self): s = cleanup_docstring('''/** * hello, * world */ ''') assert s == 'hello,\nworld'