summaryrefslogtreecommitdiff
path: root/src/zope/i18n/tests/test_plurals.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/zope/i18n/tests/test_plurals.py')
-rw-r--r--src/zope/i18n/tests/test_plurals.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/zope/i18n/tests/test_plurals.py b/src/zope/i18n/tests/test_plurals.py
index bc97bf3..2577bed 100644
--- a/src/zope/i18n/tests/test_plurals.py
+++ b/src/zope/i18n/tests/test_plurals.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
@@ -18,24 +17,26 @@ import os
import unittest
import zope.component
-from zope.i18n import tests, translate
-from zope.i18n.translationdomain import TranslationDomain
-from zope.i18n.gettextmessagecatalog import GettextMessageCatalog
from zope.i18nmessageid import MessageFactory
+
+from zope.i18n import tests
+from zope.i18n import translate
+from zope.i18n.gettextmessagecatalog import GettextMessageCatalog
from zope.i18n.interfaces import ITranslationDomain
+from zope.i18n.translationdomain import TranslationDomain
class TestPlurals(unittest.TestCase):
def _getMessageCatalog(self, locale, variant="default"):
path = os.path.dirname(tests.__file__)
- self._path = os.path.join(path, '%s-%s.mo' % (locale, variant))
+ self._path = os.path.join(path, '{}-{}.mo'.format(locale, variant))
catalog = GettextMessageCatalog(locale, variant, self._path)
return catalog
def _getTranslationDomain(self, locale, variant="default"):
path = os.path.dirname(tests.__file__)
- self._path = os.path.join(path, '%s-%s.mo' % (locale, variant))
+ self._path = os.path.join(path, '{}-{}.mo'.format(locale, variant))
catalog = GettextMessageCatalog(locale, variant, self._path)
domain = TranslationDomain('default')
domain.addCatalog(catalog)
@@ -124,22 +125,22 @@ class TestPlurals(unittest.TestCase):
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 0),
- u"Istnieją 0 plików.")
+ "Istnieją 0 plików.")
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 1),
- u"Istnieje 1 plik.")
+ "Istnieje 1 plik.")
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 3),
- u"Istnieją 3 pliki.")
+ "Istnieją 3 pliki.")
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 17),
- u"Istnieją 17 plików.")
+ "Istnieją 17 plików.")
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 23),
- u"Istnieją 23 pliki.")
+ "Istnieją 23 pliki.")
self.assertEqual(catalog.getPluralMessage(
'There is one file.', 'There are %d files.', 28),
- u"Istnieją 28 plików.")
+ "Istnieją 28 plików.")
def test_floater(self):
"""Test with the number being a float.