(self)
| 383 | self.assertEqual(app.foo, 5) |
| 384 | |
| 385 | def test_aliases_help_msg(self): |
| 386 | app = MyApp() |
| 387 | stdout = io.StringIO() |
| 388 | with contextlib.redirect_stdout(stdout): |
| 389 | app.print_alias_help() |
| 390 | hmsg = stdout.getvalue() |
| 391 | self.assertRegex(hmsg, "(?<!-)-i, --fooi\\b") |
| 392 | self.assertRegex(hmsg, "(?<!-)-j, --fooj\\b") |
| 393 | self.assertIn("Equivalent to: [--Foo.i]", hmsg) |
| 394 | self.assertIn("Equivalent to: [--Foo.j]", hmsg) |
| 395 | self.assertIn("Equivalent to: [--Foo.name]", hmsg) |
| 396 | |
| 397 | def test_alias_unrecognized(self): |
| 398 | """Check ability to override handling for unrecognized aliases""" |
nothing calls this directly
no test coverage detected