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.

    '''

    """))
Example #3
0
    def test_strip_docstring_with_single_quotes(self):
        self.assertEqual(
            'Hello.',
            docformatter.strip_docstring("""
    '''Hello.

    '''

    """))
Example #4
0
    def test_strip_docstring(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('""""""'))
Example #10
0
 def test_strip_docstring_with_unknown(self):
     with self.assertRaises(ValueError):
         docformatter.strip_docstring('foo')
Example #11
0
 def test_strip_docstring_with_unhandled(self):
     with self.assertRaises(ValueError):
         docformatter.strip_docstring('r"""foo"""')
Example #12
0
 def test_strip_docstring_with_escaped_double_quotes(self):
     self.assertEqual('hello\\"',
                      docformatter.strip_docstring('"hello\\""'))
Example #13
0
 def test_strip_docstring_with_escaped_quotes(self):
     self.assertEqual("hello\\'",
                      docformatter.strip_docstring("'hello\\''"))
Example #14
0
 def test_strip_docstring_with_empty_string(self):
     self.assertEqual('', docformatter.strip_docstring('""""""'))