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
Get rid of extra newlines
  • Loading branch information
tomasr8 committed May 4, 2025
commit 389827a6f10c86f461e3c229955315d9550e4ea8
15 changes: 0 additions & 15 deletions Lib/test/test_tools/test_msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def test_general_syntax_errors(self):
('msgstr', None),
('msgstr[0]', None),
('[0]', f'Syntax error on messages.po:1 before:{os.linesep}[0]'),

# unclosed string
(
dedent('''\
Expand All @@ -267,7 +266,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# unclosed string
(
dedent('''\
Expand All @@ -276,7 +274,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# unclosed string
(
dedent('''\
Expand All @@ -285,7 +282,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# unclosed string
(
dedent('''\
Expand All @@ -295,7 +291,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# illegal backslash
(
dedent('''\
Expand All @@ -305,7 +300,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# msgid with an index
(
dedent('''\
Expand All @@ -314,7 +308,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# invalid plural index
(
dedent('''\
Expand All @@ -324,7 +317,6 @@ def test_general_syntax_errors(self):
'''),
None
),

# invalid plural index
(
dedent('''\
Expand All @@ -334,7 +326,6 @@ def test_general_syntax_errors(self):
'''),
'indexed msgstr required for plural on messages.po:3'
),

# invalid plural index
(
dedent('''\
Expand Down Expand Up @@ -371,7 +362,6 @@ def test_semantic_errors(self):
'''),
'msgid_plural not preceded by msgid on messages.po:1'
),

# msgid_plural not allowed after comment
(
dedent('''\
Expand All @@ -383,7 +373,6 @@ def test_semantic_errors(self):
'''),
'msgid_plural not preceded by msgid on messages.po:2'
),

# msgid_plural not allowed after msgctxt
(
dedent('''\
Expand All @@ -395,7 +384,6 @@ def test_semantic_errors(self):
'''),
'msgid_plural not preceded by msgid on messages.po:2'
),

# msgid_plural not allowed after msgstr
(
dedent('''\
Expand All @@ -408,7 +396,6 @@ def test_semantic_errors(self):
'''),
'msgid_plural not preceded by msgid on messages.po:3'
),

# msgstr must be preceded by msgid
(
dedent('''\
Expand All @@ -419,7 +406,6 @@ def test_semantic_errors(self):
'''),
None
),

# msgstr not allowed after msgctxt
(
dedent('''\
Expand All @@ -431,7 +417,6 @@ def test_semantic_errors(self):
'''),
None
),

# missing msgid_plural section
(
dedent('''\
Expand Down
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