summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_optparse.py
diff options
context:
space:
mode:
authorTomas R. <tomas.roun8@gmail.com>2024-11-11 22:16:39 (GMT)
committerGitHub <noreply@github.com>2024-11-11 22:16:39 (GMT)
commitdff074d1446bab23578a6b228b0c59a17006299c (patch)
treec3d91928ccbde4e8398c2ded0f513c49fe060252 /Lib/test/test_optparse.py
parentb697d8c48e5e47c37fdd5dd74de40dfb4d6c0d01 (diff)
downloadcpython-dff074d1446bab23578a6b228b0c59a17006299c.zip
cpython-dff074d1446bab23578a6b228b0c59a17006299c.tar.gz
cpython-dff074d1446bab23578a6b228b0c59a17006299c.tar.bz2
gh-126413: Add translation tests for getopt and optparse (GH-126698)
Diffstat (limited to 'Lib/test/test_optparse.py')
-rw-r--r--Lib/test/test_optparse.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py
index 28b2744..8655a05 100644
--- a/Lib/test/test_optparse.py
+++ b/Lib/test/test_optparse.py
@@ -15,7 +15,7 @@ import unittest
from io import StringIO
from test import support
from test.support import os_helper
-
+from test.support.i18n_helper import TestTranslationsBase, update_translation_snapshots
import optparse
from optparse import make_option, Option, \
@@ -1656,5 +1656,14 @@ class MiscTestCase(unittest.TestCase):
support.check__all__(self, optparse, not_exported=not_exported)
+class TestTranslations(TestTranslationsBase):
+ def test_translations(self):
+ self.assertMsgidsEqual(optparse)
+
+
if __name__ == '__main__':
+ # To regenerate translation snapshots
+ if len(sys.argv) > 1 and sys.argv[1] == '--snapshot-update':
+ update_translation_snapshots(optparse)
+ sys.exit(0)
unittest.main()