aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_tools/test_i18n.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tools/test_i18n.py')
-rw-r--r--Lib/test/test_tools/test_i18n.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py
index 8416b1bad82..d1831d68f02 100644
--- a/Lib/test/test_tools/test_i18n.py
+++ b/Lib/test/test_tools/test_i18n.py
@@ -162,6 +162,14 @@ class Test_pygettext(unittest.TestCase):
# 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):
+ for opt in ('-o', '--output='):
+ with temp_cwd():
+ assert_python_ok(self.script, f'{opt}test')
+ self.assertTrue(os.path.exists('test'))
+ 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"'):
with self.subTest(doc):