Skip to content

Commit e5e51bd

Browse files
pythongh-130197: Test pygettext --output option (pythonGH-133041)
1 parent 27e0114 commit e5e51bd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_tools/test_i18n.py

+8
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ def test_POT_Creation_Date(self):
162162
# This will raise if the date format does not exactly match.
163163
datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z')
164164

165+
def test_output_option(self):
166+
for opt in ('-o', '--output='):
167+
with temp_cwd():
168+
assert_python_ok(self.script, f'{opt}test')
169+
self.assertTrue(os.path.exists('test'))
170+
res = assert_python_ok(self.script, f'{opt}-')
171+
self.assertIn(b'Project-Id-Version: PACKAGE VERSION', res.out)
172+
165173
def test_funcdocstring(self):
166174
for doc in ('"""doc"""', "r'''doc'''", "R'doc'", 'u"doc"'):
167175
with self.subTest(doc):

0 commit comments

Comments
 (0)