Skip to content

Commit 932f47b

Browse files
Merge branch 'main' into fix-unittest-lazy-import-patch
2 parents 226f2a0 + 9adef68 commit 932f47b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_getopt.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ def test_issue4629(self):
229229
self.assertEqual(longopts, [('--help', 'x')])
230230
self.assertRaises(getopt.GetoptError, getopt.getopt, ['--help='], '', ['help'])
231231

232+
def test_getopt_error_str(self):
233+
error = getopt.GetoptError('option -a not recognized', 'a')
234+
self.assertEqual(str(error), 'option -a not recognized')
235+
232236
def test_libref_examples():
233237
"""
234238
Examples from the Library Reference: Doc/lib/libgetopt.tex

0 commit comments

Comments
 (0)