MCPcopy Index your code
hub / github.com/kivy/python-for-android / test_unknown

Method test_unknown

tests/test_toolchain.py:41–50  ·  view source on GitHub ↗

Calling with unknown args should print help and exit 1.

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 4

ToolchainCLClass · 0.90
patch_sys_argvFunction · 0.85
raises_system_exitFunction · 0.85

Tested by

no test coverage detected