Skip to content

Commit

Permalink
improved test input to ensure error message is accurate for the corre…
Browse files Browse the repository at this point in the history
…sponding msgid without msgstr
  • Loading branch information
gabe-sherman committed Sep 26, 2024
1 parent e50d106 commit 9535041
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/messages/test_pofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,8 @@ def test_issue_1087():
assert pofile.read_po(buf).locale is None

def test_issue_1134():
buf = StringIO(r'msgid "this is an invalid po file"')
buf = StringIO('''msgid "this is an invalid po file"
msgstr "hello world"
msgid "msgid without str"''')
with pytest.raises(pofile.PoFileError):
pofile.read_po(buf, abort_invalid=True)

0 comments on commit 9535041

Please sign in to comment.