Skip to content

gettext: remove unecessary test cases testing single/double quotes #107510

@tomasr8

Description

@tomasr8

Tests for the gettext module include cases which test both single and double quotes:

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')

As the comment below suggests, these are not needed to properly test gettext as we are only testing translation lookup. The distinction between single and double quotes would be relevant for testing string extraction but that is not part of gettext. I suggest we remove these test cases.

# 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)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions