(self, func)
| 1300 | class TestConflict(ConflictBase): |
| 1301 | """Use the default conflict resolution for Optik 1.2: error.""" |
| 1302 | def assertTrueconflict_error(self, func): |
| 1303 | err = self.assertRaises( |
| 1304 | func, ("-v", "--version"), {'action' : "callback", |
| 1305 | 'callback' : self.show_version, |
| 1306 | 'help' : "show version"}, |
| 1307 | OptionConflictError, |
| 1308 | "option -v/--version: conflicting option string(s): -v") |
| 1309 | |
| 1310 | self.assertEqual(err.msg, "conflicting option string(s): -v") |
| 1311 | self.assertEqual(err.option_id, "-v/--version") |
| 1312 | |
| 1313 | def test_conflict_error(self): |
| 1314 | self.assertTrueconflict_error(self.parser.add_option) |
no test coverage detected