https://github.com/python/cpython/commit/d63c9940f0bcc5497c42c6ac2768cdab02300e10
commit: d63c9940f0bcc5497c42c6ac2768cdab02300e10
branch: main
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-06-14T19:17:45Z
summary:
gh-130197: Test `pygettext`'s `--version` CLI option (#133022)
files:
M Lib/test/test_tools/test_i18n.py
diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py
index d1831d68f0281d9..7583b61480e3709 100644
--- a/Lib/test/test_tools/test_i18n.py
+++ b/Lib/test/test_tools/test_i18n.py
@@ -427,6 +427,11 @@ def test_help_text(self):
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('''\
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]