Exemplo n.º 1
0
    def rmttest_check_language_handling(self):
        "DescWords: check language handling."

        test_config = TestConfig1()
        desc_words = DescWords(test_config)
        res = desc_words.analyse("lname", "Me and You, You and Me")
        assert -30 == res.get_value()

        fd = StringIO()
        res.write_error(fd)
        assert '''+++ Error:Analytics:DescWords:lname:result is '-30'
+++ Error:Analytics:DescWords:lname: -20:2*-10: Usage of the word 'and'
''' == fd.getvalue()