提交 1b357e58 编写于 作者: S Segev Finer

Add tests for auto completion of short options

上级 bca2f4ed
......@@ -121,6 +121,29 @@ def test_completion_option_for_command(script):
"autocomplete function could not complete ``--``"
def test_completion_short_option(script):
"""
Test getting completion for short options after ``-`` (eg. pip -)
"""
res, env = setup_completion(script, 'pip -', '1')
assert '-h' in res.stdout.split(),\
"autocomplete function could not complete short options after ``-``"
def test_completion_short_option_for_command(script):
"""
Test getting completion for short options after ``-`` in command
(eg. pip search -)
"""
res, env = setup_completion(script, 'pip search -', '2')
assert '-h' in res.stdout.split(),\
"autocomplete function could not complete short options after ``-``"
@pytest.mark.parametrize('flag', ['--bash', '--zsh', '--fish'])
def test_completion_uses_same_executable_name(script, flag):
expect_stderr = sys.version_info[:2] == (3, 3)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册