cpython/Lib/test/test_tools/i18n_data/fileloc.py
Miss Islington (bot) 86d6c68d43
[3.13] gh-104400: Add more tests to pygettext (GH-108173) (GH-126361)
(cherry picked from commit dcae5cd6ab)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-11-03 14:30:16 +00:00

26 lines
349 B
Python

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