https://github.com/python/cpython/commit/0f20281fa2f39673ec5d4a562e00d2f413890066
commit: 0f20281fa2f39673ec5d4a562e00d2f413890066
branch: main
author: Tomas R. <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2025-02-14T12:16:10Z
summary:
gh-107510: gettext: Remove unnecessary tests (GH-127965)
There are now separate pygettext tests.
files:
M Lib/test/test_gettext.py
diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index b2fe3e28c3bec7..e517c9d5c2a53f 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -10,8 +10,6 @@
# TODO:
# - Add new tests, for example for "dgettext"
-# - Remove dummy tests, for example testing for single and double quotes
-# has no sense, it would have if we were testing a parser (i.e. pygettext)
# - Tests should have only one assert.
GNU_MO_DATA = b'''\
@@ -175,30 +173,6 @@ def test_some_translations_with_context(self):
eq(pgettext('my other context', 'nudge nudge'),
'wink wink (in "my other context")')
- def test_double_quotes(self):
- eq = self.assertEqual
- # double quotes
- eq(_("albatross"), 'albatross')
- eq(_("mullusk"), 'bacon')
- eq(_(r"Raymond Luxury Yach-t"), 'Throatwobbler Mangrove')
- eq(_(r"nudge nudge"), 'wink wink')
-
- def test_triple_single_quotes(self):
- eq = self.assertEqual
- # triple single quotes
- eq(_('''albatross'''), 'albatross')
- eq(_('''mullusk'''), 'bacon')
- eq(_(r'''Raymond Luxury Yach-t'''), 'Throatwobbler Mangrove')
- eq(_(r'''nudge nudge'''), 'wink wink')
-
- def test_triple_double_quotes(self):
- eq = self.assertEqual
- # triple double quotes
- eq(_("""albatross"""), 'albatross')
- eq(_("""mullusk"""), 'bacon')
- eq(_(r"""Raymond Luxury Yach-t"""), 'Throatwobbler Mangrove')
- eq(_(r"""nudge nudge"""), 'wink wink')
-
def test_multiline_strings(self):
eq = self.assertEqual
# multiline strings
@@ -285,30 +259,6 @@ def test_some_translations_with_context_and_domain(self):
eq(gettext.dpgettext('gettext', 'my other context', 'nudge nudge'),
'wink wink (in "my other context")')
- def test_double_quotes(self):
- eq = self.assertEqual
- # double quotes
- eq(self._("albatross"), 'albatross')
- eq(self._("mullusk"), 'bacon')
- eq(self._(r"Raymond Luxury Yach-t"), 'Throatwobbler Mangrove')
- eq(self._(r"nudge nudge"), 'wink wink')
-
- def test_triple_single_quotes(self):
- eq = self.assertEqual
- # triple single quotes
- eq(self._('''albatross'''), 'albatross')
- eq(self._('''mullusk'''), 'bacon')
- eq(self._(r'''Raymond Luxury Yach-t'''), 'Throatwobbler Mangrove')
- eq(self._(r'''nudge nudge'''), 'wink wink')
-
- def test_triple_double_quotes(self):
- eq = self.assertEqual
- # triple double quotes
- eq(self._("""albatross"""), 'albatross')
- eq(self._("""mullusk"""), 'bacon')
- eq(self._(r"""Raymond Luxury Yach-t"""), 'Throatwobbler Mangrove')
- eq(self._(r"""nudge nudge"""), 'wink wink')
-
def test_multiline_strings(self):
eq = self.assertEqual
# multiline strings
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]