8000 gh-107510: gettext: Remove unnecessary tests by tomasr8 · Pull Request #127965 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107510: gettext: Remove unnecessary tests #127965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove unnecessary tests
  • Loading branch information
tomasr8 committed Dec 15, 2024
commit 4f1c5c526b1457d3069b8e399061c1a830e23f9d
50 changes: 0 additions & 50 deletions Lib/test/test_gettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'''\
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading
0