mirror of
https://github.com/open-mmlab/mim.git
synced 2025-06-03 14:59:11 +08:00
* [Refactor] Refactor list cmd * simply * fix errror when getting home-pag from pypi * fix unittet * add unittest * fix ci * fix ci * install wheel in CI to fix error * refactor and add a decorator to make sure package has been installed * rename function and add commnent for CI
18 lines
493 B
Python
18 lines
493 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.11.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()
|
|
print(result)
|
|
assert target in result
|