def test_longline(self): docstring = ("This is a very long docstring in a single line. " "Since we have nothing useful to put in here let's just " "mention avocado: it's awesome, but that was not a " "directive. a tag would be something line this: " ":avocado: enable") self.assertIsNotNone(safeloader.get_docstring_directive(docstring))
def test_newlines(self): docstring = ("\n\n\nThis is a docstring with many new\n\nlines " "followed by an avocado tag\n" "\n\n:avocado: enable\n\n") self.assertIsNotNone(safeloader.get_docstring_directive(docstring))