def test_assign_random_plurals_middle(self):
        random.seed(124)
        word_lists = [Sentence([Noun('a'), Noun('b'), Noun('c')])]
        paragraph = Paragraph(word_lists)
        pa = PluralsAssignment(paragraph)

        expected_plurals = [[Noun('c')], [Noun('b')], [Noun('a'),
                                                       Noun('b')],
                            [Noun('b'), Noun('c')],
                            [Noun('a'), Noun('b'),
                             Noun('c')]]
        for index in range(5):
            new_paragraph = pa.assign_random_plurals(0.5)

            plurals = expected_plurals[index]
            test_paragraph = pa.assign_plural(plurals)
            self.assertEqual(new_paragraph.sentence_list(),
                             test_paragraph.sentence_list())
    def test_assign_plurals(self):
        raw_sentences = [
            Sentence([Noun('x'), Noun('y'),
                      BasicWord('z')]),
            Sentence([Noun('z'), Noun('x'), Noun('y')])
        ]
        raw_paragraph = Paragraph(raw_sentences, Tags([StatusTag.RAW]))

        pa = PluralsAssignment(raw_paragraph)

        plurals = [Noun('x'), Noun('z')]
        new = pa.assign_plural(plurals)

        expected = [
            Sentence([Noun('x').plural(),
                      Noun('y'), BasicWord('z')]),
            Sentence([Noun('z').plural(),
                      Noun('x').plural(),
                      Noun('y')])
        ]
        self.assertEqual(new.sentence_list(), expected)
        self.assertEqual(new.tags, Tags([StatusTag.RAW,
                                         StatusTag.HAS_PLURALS]))