Lib/test/test_tools/i18n_data/fileloc.py
raw| 1 | # Test file locations |
| 2 | from gettext import gettext as _ |
| 3 | |
| 4 | # Duplicate strings |
| 5 | _('foo') |
| 6 | _('foo') |
| 7 | |
| 8 | # Duplicate strings on the same line should only add one location to the output |
| 9 | _('bar'), _('bar') |
| 10 | |
| 11 | |
| 12 | # Duplicate docstrings |
| 13 | class A: |
| 14 | """docstring""" |
| 15 | |
| 16 | |
| 17 | def f(): |
| 18 | """docstring""" |
| 19 | |
| 20 | |
| 21 | # Duplicate message and docstring |
| 22 | _('baz') |
| 23 | |
| 24 | |
| 25 | def g(): |
| 26 | """baz""" |