]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-130197: Test `pygettext`'s `--version` CLI option (#133022)
authorStan Ulbrych <stan@python.org>
Sun, 14 Jun 2026 19:17:45 +0000 (20:17 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Jun 2026 19:17:45 +0000 (19:17 +0000)
Lib/test/test_tools/test_i18n.py

index d1831d68f0281d95841c2c33f03ddd5f0e841083..7583b61480e3709fa4a212c1aba4ac244b12e21f 100644 (file)
@@ -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('''\