FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-85012: Properly reset `msgctxt` when compiling messages with `msgfmt` by tomasr8 · Pull Request #130525 · python/cpython · GitHub

Repository navigation

Prev Previous commit
Merge remote-tracking branch 'upstream/main' into msgfmt-ctxt
  • Loading branch information
tomasr8 committed Feb 25, 2025
commit d4dcc879c7faf690252d4ea6431353c294605655
8 changes: 8 additions & 0 deletions Lib/test/test_tools/test_msgfmt.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ def test_translations(self):
'%d emails sent.', 2),
'%d emails sent.')

def test_po_with_bom(self):
with temp_cwd():
Path('bom.po').write_bytes(b'\xef\xbb\xbfmsgid "Python"\nmsgstr "Pioton"\n')

res = assert_python_failure(msgfmt, 'bom.po')
err = res.err.decode('utf-8')
self.assertIn('The file bom.po starts with a UTF-8 BOM', err)

def test_invalid_msgid_plural(self):
with temp_cwd():
Path('invalid.po').write_text('''\
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.

Back | FazBrowse Home | New Git URL