Skip to content

Commit f7f91ca

Browse files
StanFromIrelandmiss-islington
authored andcommitted
pythongh-130197: Test pygettext --output option (pythonGH-133041)
(cherry picked from commit e5e51bd) Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 90c786e commit f7f91ca

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
@@ -149,6 +149,14 @@ def test_POT_Creation_Date(self):
149149
# This will raise if the date format does not exactly match.
150150
datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z')
151151

152+
def test_output_option(self):
153+
for opt in ('-o', '--output='):
154+
with temp_cwd():
155+
assert_python_ok(self.script, f'{opt}test')
156+
self.assertTrue(os.path.exists('test'))
157+
res = assert_python_ok(self.script, f'{opt}-')
158+
self.assertIn(b'Project-Id-Version: PACKAGE VERSION', res.out)
159+
152160
def test_funcdocstring(self):
153161
for doc in ('"""doc"""', "r'''doc'''", "R'doc'", 'u"doc"'):
154162
with self.subTest(doc):

0 commit comments

Comments
 (0)