From 2daefb912bdc1bf656b5124f3224f8bd28013b03 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sat, 26 Apr 2025 19:55:20 +0100 Subject: [PATCH 1/2] test --- Lib/test/test_tools/test_i18n.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index 8416b1bad825eb..93e07c2f4bcd60 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -419,6 +419,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.assertEqual(res.out, b'pygettext.py (xgettext for Python) 1.5\n') + def test_error_messages(self): """Test that pygettext outputs error messages to stderr.""" stderr = self.get_stderr(dedent('''\ From 3fb72c42eea65deee29e4442ecfc61871c241825 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sat, 26 Apr 2025 20:35:21 +0100 Subject: [PATCH 2/2] Windows and its returns... --- Lib/test/test_tools/test_i18n.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index 93e07c2f4bcd60..0d75e69d2c36a2 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -422,7 +422,7 @@ def test_help_text(self): def test_version_text(self): """Test that the version text is displayed.""" res = assert_python_ok(self.script, '--version') - self.assertEqual(res.out, b'pygettext.py (xgettext for Python) 1.5\n') + 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."""