Skip to content

Commit d14a1b7

Browse files
[3.13] gh-130197: Test pygettext --output option (GH-133041) (GH-133266)
(cherry picked from commit e5e51bd) Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 4c7a04b commit d14a1b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_tools/test_i18n.py

Lines changed: 8 additions & 0 deletions
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)