Calling with unknown args should print help and exit 1.
(self)
| 39 | |
| 40 | @pytest.mark.skipif(sys.version_info < (3, 0), reason="requires python3") |
| 41 | def test_unknown(self): |
| 42 | """ |
| 43 | Calling with unknown args should print help and exit 1. |
| 44 | """ |
| 45 | argv = ['toolchain.py', '--unknown'] |
| 46 | with patch_sys_argv(argv), raises_system_exit( |
| 47 | ) as ex_info, patch_argparse_print_help() as m_print_help: |
| 48 | ToolchainCL() |
| 49 | assert ex_info.value.code == 1 |
| 50 | assert m_print_help.call_args_list == [mock.call()] |
| 51 | |
| 52 | def test_create(self): |
| 53 | """ |
nothing calls this directly
no test coverage detected