Example #1
0
    def test_wrong(self):

        errors = check_po_file(PO_WRONG)

        eq_(len(errors), 1)

        eq_(errors[0][0], '{number} dataset found for {query}')
Example #2
0
    def test_wrong(self):

        errors = check_po_file(PO_WRONG)

        eq_(len(errors), 1)

        eq_(errors[0][0], '{number} dataset found for {query}')
Example #3
0
    def test_wrong_plurals(self):

        errors = check_po_file(PO_WRONG_PLURALS)

        eq_(len(errors), 2)

        for error in errors:
            assert error[0] in ('{hours} hour ago', '{hours} hours ago')
Example #4
0
    def test_wrong_plurals(self):

        errors = check_po_file(PO_WRONG_PLURALS)

        eq_(len(errors), 2)

        for error in errors:
            assert error[0] in ('{hours} hour ago', '{hours} hours ago')
Example #5
0
    def test_plurals_ok(self):

        errors = check_po_file(PO_PLURALS_OK)

        eq_(errors, [])
Example #6
0
    def test_basic(self):

        errors = check_po_file(PO_OK)

        eq_(errors, [])
Example #7
0
    def test_plurals_ok(self):

        errors = check_po_file(PO_PLURALS_OK)

        eq_(errors, [])
Example #8
0
    def test_basic(self):

        errors = check_po_file(PO_OK)

        eq_(errors, [])
Example #9
0
def test_wrong_plurals():
    errors = check_po_file(PO_WRONG_PLURALS)
    assert len(errors) == 2

    for error in errors:
        assert error[0] in ("{hours} hour ago", "{hours} hours ago")
Example #10
0
def test_plurals_ok():
    errors = check_po_file(PO_PLURALS_OK)
    assert errors == []
Example #11
0
def test_wrong():
    errors = check_po_file(PO_WRONG)
    assert len(errors) == 1
    assert errors[0][0] == "{number} dataset found for {query}"
Example #12
0
def test_basic():
    errors = check_po_file(PO_OK)
    assert errors == []