def test_split_summary_and_description_with_quote(self): self.assertEqual(('This is the first\n"one".', ''), docformatter.split_summary_and_description( 'This is the first\n"one".')) self.assertEqual(("This is the first\n'one'.", ''), docformatter.split_summary_and_description( "This is the first\n'one'.")) self.assertEqual(('This is the first\n``one``.', ''), docformatter.split_summary_and_description( 'This is the first\n``one``.'))
def test_split_summary_and_description_with_list_on_other_line(self): self.assertEqual(('Test\n test', ' @blah'), docformatter.split_summary_and_description('''\ Test test @blah '''))
def test_split_summary_and_description_with_abbreviation(self): for text in [ 'Test e.g. now' 'Test i.e. now', 'Test Dr. now', 'Test Mr. now', 'Test Mrs. now', 'Test Ms. now' ]: self.assertEqual((text, ''), docformatter.split_summary_and_description(text))
def test_split_summary_and_description_with_abbreviation(self): for text in ['Test e.g. now' 'Test i.e. now', 'Test Dr. now', 'Test Mr. now', 'Test Mrs. now', 'Test Ms. now']: self.assertEqual( (text, ''), docformatter.split_summary_and_description(text))
def test_split_summary_and_description_without__punctuation(self): self.assertEqual(("""\ Try this and this and this and this and this and this and this at this other line""", """ Parameters ---------- email : string"""), docformatter.split_summary_and_description('''\ Try this and this and this and this and this and this and this at this other line Parameters ---------- email : string '''))
def test_split_summary_and_description_with_late__punctuation(self): self.assertEqual(("""\ Try this and this and this and this and this and this and this at http://example.com/""", """ Parameters ---------- email : string"""), docformatter.split_summary_and_description('''\ Try this and this and this and this and this and this and this at http://example.com/ Parameters ---------- email : string '''))
def test_split_summary_and_description_without__punctuation(self): self.assertEqual( ("""\ Try this and this and this and this and this and this and this at this other line""", """ Parameters ---------- email : string"""), docformatter.split_summary_and_description('''\ Try this and this and this and this and this and this and this at this other line Parameters ---------- email : string '''))
def test_split_summary_and_description_with_late__punctuation(self): self.assertEqual( ("""\ Try this and this and this and this and this and this and this at http://example.com/""", """ Parameters ---------- email : string"""), docformatter.split_summary_and_description('''\ Try this and this and this and this and this and this and this at http://example.com/ Parameters ---------- email : string '''))
def test_split_summary_and_description_more_complex(self): self.assertEqual( ('This is the first.', 'This is the second. This is the third.'), docformatter.split_summary_and_description( 'This is the first.\nThis is the second. This is the third.'))
def test_split_summary_and_description_with_list_of_parameters(self): self.assertEqual(('This is the first', 'one - one\ntwo - two'), docformatter.split_summary_and_description( 'This is the first\none - one\ntwo - two'))
def test_split_summary_and_description_with_question_mark(self): self.assertEqual(('This is the first?', 'one\ntwo'), docformatter.split_summary_and_description( 'This is the first?\none\ntwo'))
def test_split_summary_and_description_with_exclamation(self): self.assertEqual(('This is the first!', 'one\ntwo'), docformatter.split_summary_and_description( 'This is the first!\none\ntwo'))
def test_split_summary_and_description_with_other_symbol(self): self.assertEqual(('This is the first', '@ one\n@ two'), docformatter.split_summary_and_description( 'This is the first\n@ one\n@ two'))
def test_split_summary_and_description_with_capital(self): self.assertEqual(('This is the first\nWashington', ''), docformatter.split_summary_and_description( 'This is the first\nWashington'))
def test_split_summary_and_description_with_list(self): self.assertEqual(('This is the first', '- one\n- two'), docformatter.split_summary_and_description( 'This is the first\n- one\n- two'))