示例#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
class OptionalPluralCheckTest(TestCase):
    def setUp(self):
        self.check = OptionalPluralCheck()

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

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

    def test_failing(self):
        self.assertTrue(
            self.check.check_source(
                ['text(s)'],
                '',
                Unit(),
            )
        )
示例#3
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()))
示例#4
0
 def setUp(self):
     self.check = OptionalPluralCheck()
示例#5
0
 def setUp(self):
     self.check = OptionalPluralCheck()