def test_unwrap_multiple_incomplete_sentences_to_same_line(self):
     lines = [
         "Another sentence", "which continues. With another on the next",
         "line."
     ]
     self.assertEqual(unwrap_sentences(lines), [
         "Another sentence which continues.",
         "With another on the next line."
     ])
 def test_should_wrap_network_disk_correctly(self):
     lines = [
         "",
         "Notera att du behöver ha en Samba-användare och att lösenordet behöver ändras med `smbpasswd` (och som sedan synkas till ditt",
         '"vanliga" Linux-användarkonto. (Se [[it:server_users|]])', ''
     ]
     self.assertEqual(unwrap_sentences(lines), [
         '',
         'Notera att du behöver ha en Samba-användare och att lösenordet behöver ändras med `smbpasswd` (och som sedan synkas till ditt "vanliga" Linux-användarkonto.',
         "(Se [[it:server_users|]])", ''
     ])
 def test_does_not_unwrap_if_next_line_starts_with_non_alfa(self):
     lines = ["Yet another sentence", " which continues on the next line."]
     self.assertEqual(
         unwrap_sentences(lines),
         ["Yet another sentence", " which continues on the next line."])
 def test_unwrap_incomplete_sentences_to_same_line(self):
     lines = ["A sentence", "which continues on the next line."]
     self.assertEqual(unwrap_sentences(lines),
                      ["A sentence which continues on the next line."])
 def test_unwrap_two_sentences_on_same_line(self):
     lines = ["A sentence. And another."]
     self.assertEqual(unwrap_sentences(lines),
                      ["A sentence.", "And another."])
 def test_unwrap_empty_line(self):
     lines = [""]
     self.assertEqual(unwrap_sentences(lines), [""])
 def test_unwrap_single_line(self):
     lines = ["A single line."]
     self.assertEqual(unwrap_sentences(lines), ["A single line."])
 def disabled_test_should_not_wrap_consequtive_lines_with_lists(self):
     lines = ["1. a list", "1. second bullet"]
     self.assertEqual(unwrap_sentences(lines),
                      ["1. a list", "1. second bullet"])