gh-104400: Add more tests to pygettext (GH-108173)

This commit is contained in:
Tomas R. 2024-11-03 15:01:09 +01:00 committed by GitHub
parent 556dc9b8a7
commit dcae5cd6ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 363 additions and 21 deletions

View file

@ -0,0 +1,26 @@
# Test file locations
from gettext import gettext as _
# Duplicate strings
_('foo')
_('foo')
# Duplicate strings on the same line should only add one location to the output
_('bar'), _('bar')
# Duplicate docstrings
class A:
"""docstring"""
def f():
"""docstring"""
# Duplicate message and docstring
_('baz')
def g():
"""baz"""