Skip to content

gh-130197: Improve test coverage of msgfmt.py part 2 #133309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Windows fix
  • Loading branch information
tomasr8 committed May 4, 2025
commit d6bdd7c0897b98f0988cc1fdf215504e1c668859
5 changes: 2 additions & 3 deletions Lib/test/test_tools/test_msgfmt.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Tests for the Tools/i18n/msgfmt.py tool."""

import json
import os
import struct
import sys
import unittest
Expand Down Expand Up @@ -250,14 +249,14 @@ def test_general_syntax_errors(self):
('', None),
('"', None),
('""', 'Syntax error on messages.po:1 before:'),
('"foo"', f'Syntax error on messages.po:1 before:{os.linesep}foo'),
('"foo"', f'Syntax error on messages.po:1 before:\nfoo'),
# 'msgid', # invalid but currently accepted
('msgstr', None),
('msgid_plural', 'msgid_plural not preceded by msgid on messages.po:1'),
# 'msgctxt', # invalid but currently accepted
('msgstr', None),
('msgstr[0]', None),
('[0]', f'Syntax error on messages.po:1 before:{os.linesep}[0]'),
('[0]', f'Syntax error on messages.po:1 before:\n[0]'),
# unclosed string
(
dedent('''\
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy