Issue 697939: optparse unit tests + fixes (original) (raw)

Here's a patch that mostly converts the tests from optik 1.4 to the unittest format and makes it usable in the Python library. I've also added some tests, of which five fail with current CVS:

test_opt_string_empty test_opt_string_too_short test_opt_string_long_invalid test_opt_string_short_invalid test_help_long_opts_first

I changed the following to fix the tests:

I'm not sure why the check was there, because _short_opts and _long_opts are only empty when instantation fails, or when somebody set those internal attributes to false. And the moment you start mucking with internal attributes, you're on your own. :)