(self)
| 1129 | []) |
| 1130 | |
| 1131 | def test_callback_help(self): |
| 1132 | # This test was prompted by SF bug #960515 -- the point is |
| 1133 | # not to inspect the help text, just to make sure that |
| 1134 | # format_help() doesn't crash. |
| 1135 | parser = OptionParser(usage=SUPPRESS_USAGE) |
| 1136 | parser.remove_option("-h") |
| 1137 | parser.add_option("-t", "--test", action="callback", |
| 1138 | callback=lambda: None, type="string", |
| 1139 | help="foo") |
| 1140 | |
| 1141 | expected_help = ("Options:\n" |
| 1142 | " -t TEST, --test=TEST foo\n") |
| 1143 | self.assertHelp(parser, expected_help) |
| 1144 | |
| 1145 | |
| 1146 | class TestCallbackExtraArgs(BaseTest): |
nothing calls this directly
no test coverage detected