class EndExclamationCheckTest(CheckTestCase): check = EndExclamationCheck() def setUp(self): super(EndExclamationCheckTest, self).setUp() self.test_good_matching = ('string!', 'string!', '') self.test_failure_1 = ('string!', 'string', '') self.test_failure_2 = ('string', 'string!', '') def test_hy(self): self.do_test(False, ('Text!', 'Texte՜', ''), 'hy') self.do_test(False, ('Text!', 'Texte', ''), 'hy') self.do_test(False, ('Text', 'Texte!', ''), 'hy') def test_eu(self): self.do_test(False, ('Text!', '¡Texte!', ''), 'eu') def test_french(self): self.do_test(False, ('Text!', 'Texte !', ''), 'fr') def test_french_ignore(self): self.do_test(False, ('Text', 'Texte', ''), 'fr') def test_french_wrong(self): self.do_test(True, ('Text!', 'Texte!', ''), 'fr') self.do_test(False, ('Text!', 'Texte !', ''), 'fr')
class EndExclamationCheckTest(CheckTestCase): check = EndExclamationCheck() def setUp(self): super().setUp() self.test_good_matching = ("string!", "string!", "") self.test_failure_1 = ("string!", "string", "") self.test_failure_2 = ("string", "string!", "") def test_hy(self): self.do_test(False, ("Text!", "Texte՜", ""), "hy") self.do_test(False, ("Text!", "Texte", ""), "hy") self.do_test(False, ("Text", "Texte!", ""), "hy") def test_eu(self): self.do_test(False, ("Text!", "¡Texte!", ""), "eu")