Skip to content

Commit 5c2db9e

Browse files
committed
Add test coverage to check execution of GetoptError.__str__
1 parent 05c7060 commit 5c2db9e

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

Lib/test/test_getopt.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ def setUp(self):
1818
def assertError(self, *args, **kwargs):
1919
self.assertRaises(getopt.GetoptError, *args, **kwargs)
2020

21-
def assertErrorMessage(self, *args, message, **kwargs):
22-
self.assertRaisesRegex(getopt.GetoptError, message, *args, **kwargs)
23-
24-
def test_getopts_error_str(self):
25-
error = getopt.GetoptError('option -a not recognized', 'a')
26-
self.assertEqual(str(error), 'option -a not recognized')
27-
28-
2921
def test_short_has_arg(self):
3022
self.assertIs(getopt.short_has_arg('a', 'a:'), True)
3123
self.assertIs(getopt.short_has_arg('a', 'a'), False)

0 commit comments

Comments
 (0)