mirror of
https://github.com/open-mmlab/mim.git
synced 2025-06-03 14:59:11 +08:00
* [Enhancement] Change the directory of configs to be saved * configs tools model-index.yml will be copied to .mim * copy files to .mim if setup.py does not handle this * simply list command * remove redundant code * remove redundant code * modify according to comment
17 lines
475 B
Python
17 lines
475 B
Python
from click.testing import CliRunner
|
|
|
|
from mim.commands.install import cli as install
|
|
from mim.commands.list import list_package
|
|
|
|
|
|
def test_list():
|
|
runner = CliRunner()
|
|
# mim install mmcls==0.12.0 --yes
|
|
result = runner.invoke(install, ['mmcls==0.12.0', '--yes'])
|
|
assert result.exit_code == 0
|
|
# mim list
|
|
target = ('mmcls', '0.12.0',
|
|
'https://github.com/open-mmlab/mmclassification')
|
|
result = list_package()
|
|
assert target in result
|