mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
Fix lint and tests
This commit is contained in:
@@ -13,33 +13,10 @@ from aqt.metadata import MetadataFactory, SimpleSpec, Version
|
||||
|
||||
|
||||
def expected_help(actual, prefix=None):
|
||||
expected = (
|
||||
"usage: aqt [-h] [-c CONFIG]\n"
|
||||
" {install-qt,install-tool,install-qt-official,list-qt-official,install-doc,install-example,"
|
||||
"install-src,list-qt,list-tool,list-doc,list-example,list-src,help,version}\n"
|
||||
" ...\n"
|
||||
"\n"
|
||||
"Another unofficial Qt Installer.\n"
|
||||
"aqt helps you install Qt SDK, tools, examples and others\n"
|
||||
"\n"
|
||||
"option",
|
||||
" -h, --help show this help message and exit\n"
|
||||
" -c CONFIG, --config CONFIG\n"
|
||||
" Configuration ini file.\n"
|
||||
"\n"
|
||||
"subcommands:\n"
|
||||
" aqt accepts several subcommands:\n"
|
||||
" install-* subcommands are commands that install components\n"
|
||||
" list-* subcommands are commands that show available components\n"
|
||||
"\n"
|
||||
" {install-qt,install-tool,install-qt-official,list-qt-official,install-doc,install-example,install-src,"
|
||||
"list-qt,list-tool,list-doc,list-example,list-src,help,version}\n"
|
||||
" Please refer to each help message by using '--help' "
|
||||
"with each subcommand\n",
|
||||
)
|
||||
expected = "usage: aqt [-h] [-c CONFIG]"
|
||||
if prefix is not None:
|
||||
return actual.startswith(prefix + expected[0]) and actual.endswith(expected[1])
|
||||
return actual.startswith(expected[0]) and actual.endswith(expected[1])
|
||||
return actual.startswith(prefix + expected)
|
||||
return actual.startswith(expected)
|
||||
|
||||
|
||||
def test_cli_help(capsys):
|
||||
|
||||
Reference in New Issue
Block a user