summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-23 12:29:08 (GMT)
committerGitHub <noreply@github.com>2023-07-23 12:29:08 (GMT)
commitbd72fb19ef1a01fde067109288ecacc62121f0ae (patch)
treee0c96d7cf1c639b7dfaa50442291670889f36546 /Lib/test
parentaf95a1da465da82740541bf011a324fefaf53713 (diff)
downloadcpython-bd72fb19ef1a01fde067109288ecacc62121f0ae.zip
cpython-bd72fb19ef1a01fde067109288ecacc62121f0ae.tar.gz
cpython-bd72fb19ef1a01fde067109288ecacc62121f0ae.tar.bz2
[3.12] bpo-18319: gettext() can retrieve a message even if a plural form exists (GH-19869) (#107108)
(cherry picked from commit 54632528eeba841e4a8cc95ecbd84c9aca8eef57) Co-authored-by: Gilles Bassière <gbassiere@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_gettext.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index 1608d1b..aa3520d 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -320,6 +320,8 @@ class PluralFormsTestCase(GettextBaseTest):
eq(x, 'Hay %s fichero')
x = gettext.ngettext('There is %s file', 'There are %s files', 2)
eq(x, 'Hay %s ficheros')
+ x = gettext.gettext('There is %s file')
+ eq(x, 'Hay %s fichero')
def test_plural_context_forms1(self):
eq = self.assertEqual
@@ -338,6 +340,8 @@ class PluralFormsTestCase(GettextBaseTest):
eq(x, 'Hay %s fichero')
x = t.ngettext('There is %s file', 'There are %s files', 2)
eq(x, 'Hay %s ficheros')
+ x = t.gettext('There is %s file')
+ eq(x, 'Hay %s fichero')
def test_plural_context_forms2(self):
eq = self.assertEqual