gh-129911: pygettext: Fix the keyword entry in help output (GH-129914)

This commit is contained in:
Tomas R. 2025-02-14 10:34:09 +01:00 committed by GitHub
parent 3bd3e09588
commit 9d1e668e6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View file

@ -413,6 +413,12 @@ class Test_pygettext(unittest.TestCase):
self.assertIn(f'msgid "{text2}"', data)
self.assertNotIn(text3, data)
def test_help_text(self):
"""Test that the help text is displayed."""
res = assert_python_ok(self.script, '--help')
self.assertEqual(res.out, b'')
self.assertIn(b'pygettext -- Python equivalent of xgettext(1)', res.err)
def test_error_messages(self):
"""Test that pygettext outputs error messages to stderr."""
stderr = self.get_stderr(dedent('''\