mim/tests/test_list.py
Zaida Zhou acab45a6fa
[Refactor] Change resources directory to .mim (#68)
* [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
2021-07-24 17:27:21 +08:00

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