From: Stan Ulbrych Date: Sun, 14 Jun 2026 19:17:45 +0000 (+0100) Subject: gh-130197: Test `pygettext`'s `--version` CLI option (#133022) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;p=thirdparty%2FPython%2Fcpython.git gh-130197: Test `pygettext`'s `--version` CLI option (#133022) --- diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index d1831d68f028..7583b61480e3 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -427,6 +427,11 @@ class Test_pygettext(unittest.TestCase): self.assertEqual(res.out, b'') self.assertIn(b'pygettext -- Python equivalent of xgettext(1)', res.err) + def test_version_text(self): + """Test that the version text is displayed.""" + res = assert_python_ok(self.script, '--version') + self.assertIn(b'pygettext.py (xgettext for Python) 1.5', res.out) + def test_error_messages(self): """Test that pygettext outputs error messages to stderr.""" stderr = self.get_stderr(dedent('''\