예제 #1
0
 def test_separate_paragraphs(self):
     source = [(0, "This is the first paragraph"), (0, ""),
               (4, "This is the second paragraph")]
     expected = [(0, "This is the first paragraph"), (0, ""),
                 (4, "This is the second paragraph")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #2
0
 def test_first_line_non_indent(self):
     source   = [(0, "The first line"),
                 (4, "The second line")]
     expected = [(4, "The first line"),
                 (4, "The second line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #3
0
 def test_increasing_indent(self):
     source = [(0, "The first line"), (4, "The second line"),
               (8, "The third line")]
     expected = [(4, "The first line"), (4, "The second line"),
                 (8, "The third line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #4
0
 def test_first_line_non_indent(self):
     source   = [(0, "The first line"),
                 (4, "The second line")]
     expected = [(4, "The first line"),
                 (4, "The second line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #5
0
 def test_double_line_indented_comment(self):
     source   = [(4, "The first line"),
                 (4, "The second line")]
     expected = [(4, "The first line"),
                 (4, "The second line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #6
0
 def test_double_line_indented_comment(self):
     source   = [(4, "The first line"),
                 (4, "The second line")]
     expected = [(4, "The first line"),
                 (4, "The second line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #7
0
 def test_separated_lines_first_line_indented(self):
     source   = [(4, "The first line"),
                 (4, ""),
                 (4, "The third line")]
     expected = [(4, "The first line"),
                 (4, ""),
                 (4, "The third line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #8
0
 def test_separate_paragraphs_indented(self):
     source   = [(4, "This is the first paragraph"),
                 (4, ""),
                 (8, "This is the second paragraph")]
     expected = [(4, "This is the first paragraph"),
                 (4, ""),
                 (8, "This is the second paragraph")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #9
0
 def test_increasing_indent(self):
     source   = [(0, "The first line"),
                 (4, "The second line"),
                 (8, "The third line")]
     expected = [(4, "The first line"),
                 (4, "The second line"),
                 (8, "The third line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #10
0
 def test_separated_lines_first_line_indented(self):
     source   = [(4, "The first line"),
                 (4, ""),
                 (4, "The third line")]
     expected = [(4, "The first line"),
                 (4, ""),
                 (4, "The third line")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #11
0
 def test_single_line_indented_comment(self):
     source = [(4, "A single line comment")]
     expected = [(4, "A single line comment")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #12
0
 def test_zero_lines(self):
     source = []
     expected = []
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #13
0
 def test_single_line_indented_comment(self):
     source   = [(4, "A single line comment")]
     expected = [(4, "A single line comment")]
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)
예제 #14
0
 def test_zero_lines(self):
     source   = []
     expected = []
     actual = first_paragraph_indent(source)
     self.assertEqual(actual, expected)