mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-130197: Test pygettext --output option (GH-133041)
This commit is contained in:
parent
27e011455d
commit
e5e51bd7f7
1 changed files with 8 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue