File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2286,6 +2286,28 @@ def test_get_settable_completion_items(base_app) -> None:
22862286 assert cur_settable .description [0 :10 ] in cur_res .descriptive_data [1 ]
22872287
22882288
2289+ def test_completion_supported (base_app ) -> None :
2290+ # use_rawinput is True and completekey is non-empty -> True
2291+ base_app .use_rawinput = True
2292+ base_app .completekey = 'tab'
2293+ assert base_app ._completion_supported () is True
2294+
2295+ # use_rawinput is False and completekey is non-empty -> False
2296+ base_app .use_rawinput = False
2297+ base_app .completekey = 'tab'
2298+ assert base_app ._completion_supported () is False
2299+
2300+ # use_rawinput is True and completekey is empty -> False
2301+ base_app .use_rawinput = True
2302+ base_app .completekey = ''
2303+ assert base_app ._completion_supported () is False
2304+
2305+ # use_rawinput is False and completekey is empty -> False
2306+ base_app .use_rawinput = False
2307+ base_app .completekey = ''
2308+ assert base_app ._completion_supported () is False
2309+
2310+
22892311def test_alias_no_subcommand (base_app ) -> None :
22902312 _out , err = run_cmd (base_app , 'alias' )
22912313 assert "Usage: alias [-h]" in err [0 ]
You can’t perform that action at this time.
0 commit comments