Beispiel #1
0
    def test_text_justification(self):
        self.assertEqual(
            ["This    is    an", "example  of text", "justification.  "],
            text_justification([
                "This", "is", "an", "example", "of", "text", "justification."
            ], 16))

        self.assertEqual(
            ["What   must   be", "acknowledgment  ", "shall be        "],
            text_justification(
                ["What", "must", "be", "acknowledgment", "shall", "be"], 16))
Beispiel #2
0
    def test_text_justification(self):
        self.assertEqual(["This    is    an",
                          "example  of text",
                          "justification.  "],

                         text_justification(["This", "is", "an", "example", "of", "text", "justification."]
                                            , 16)
                         )

        self.assertEqual(["What   must   be",
                          "acknowledgment  ",
                          "shall be        "],

                         text_justification(["What", "must", "be", "acknowledgment", "shall", "be"]
                                            , 16)
                         )