def test_strip_docstring(self): self.assertEqual( 'Hello.', docformatter.strip_docstring(''' """Hello. """ '''))
def test_strip_docstring_with_single_quotes(self): self.assertEqual( 'Hello.', docformatter.strip_docstring(""" '''Hello. ''' """))
def test_strip_docstring_with_unknown(self): with self.assertRaises(ValueError): docformatter.strip_docstring('foo')
def test_strip_docstring_with_unhandled(self): with self.assertRaises(ValueError): docformatter.strip_docstring('r"""foo"""')
def test_strip_docstring_with_escaped_double_quotes(self): self.assertEqual('hello\\"', docformatter.strip_docstring('"hello\\""'))
def test_strip_docstring_with_escaped_quotes(self): self.assertEqual("hello\\'", docformatter.strip_docstring("'hello\\''"))
def test_strip_docstring_with_empty_string(self): self.assertEqual('', docformatter.strip_docstring('""""""'))