From 4b89995c54cce615cc45a4f1373be33d97a3a128 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 27 Apr 2025 11:53:53 +0100 Subject: [PATCH 1/3] test --- Lib/test/test_tools/test_i18n.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index 8416b1bad825eb..ea1d46d9db6b32 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -162,6 +162,13 @@ def test_POT_Creation_Date(self): # This will raise if the date format does not exactly match. datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z') + def test_output_option(self): + with temp_cwd(None) as cwd: + assert_python_ok('-Xutf8', self.script, '--output=test') + assert_python_ok('-Xutf8', self.script, '--output=file.pot') + self.assertTrue(os.path.exists('test')) + self.assertTrue(os.path.exists('file.pot')) + def test_funcdocstring(self): for doc in ('"""doc"""', "r'''doc'''", "R'doc'", 'u"doc"'): with self.subTest(doc): From 50a543a1de6592e3446845ce0e864d840b476615 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 27 Apr 2025 16:27:00 +0100 Subject: [PATCH 2/3] Test -o too --- Lib/test/test_tools/test_i18n.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index ea1d46d9db6b32..0d4a868971328e 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -163,11 +163,14 @@ def test_POT_Creation_Date(self): datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z') def test_output_option(self): - with temp_cwd(None) as cwd: - assert_python_ok('-Xutf8', self.script, '--output=test') - assert_python_ok('-Xutf8', self.script, '--output=file.pot') - self.assertTrue(os.path.exists('test')) - self.assertTrue(os.path.exists('file.pot')) + for opt in ('-o', '--output='): + with temp_cwd(): + assert_python_ok(self.script, f'{opt}test') + self.assertTrue(os.path.exists('test')) + assert_python_ok(self.script, f'{opt}file.pot') + self.assertTrue(os.path.exists('file.pot')) + res = assert_python_ok(self.script, f'{opt}-') + self.assertIn(b'Project-Id-Version: PACKAGE VERSION', res.out) def test_funcdocstring(self): for doc in ('"""doc"""', "r'''doc'''", "R'doc'", 'u"doc"'): From ab3c59b687928a35c5175bc33cc9a81aa3dbd4c0 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Thu, 1 May 2025 16:40:37 +0100 Subject: [PATCH 3/3] Less tests --- Lib/test/test_tools/test_i18n.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py index 0d4a868971328e..d1831d68f0281d 100644 --- a/Lib/test/test_tools/test_i18n.py +++ b/Lib/test/test_tools/test_i18n.py @@ -167,8 +167,6 @@ def test_output_option(self): with temp_cwd(): assert_python_ok(self.script, f'{opt}test') self.assertTrue(os.path.exists('test')) - assert_python_ok(self.script, f'{opt}file.pot') - self.assertTrue(os.path.exists('file.pot')) res = assert_python_ok(self.script, f'{opt}-') self.assertIn(b'Project-Id-Version: PACKAGE VERSION', res.out) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy