示例#1
0
class OptionalPluralCheckTest(TestCase):
    def setUp(self):
        self.check = OptionalPluralCheck()

    def test_none(self):
        self.assertFalse(
            self.check.check_source(
                ['text'],
                MockUnit(),
            )
        )

    def test_plural(self):
        self.assertFalse(
            self.check.check_source(
                ['text', 'texts'],
                MockUnit(),
            )
        )

    def test_failing(self):
        self.assertTrue(
            self.check.check_source(
                ['text(s)'],
                MockUnit(),
            )
        )
示例#2
0
 def setUp(self):
     self.check = OptionalPluralCheck()