rasterio/tests/test_cli_main.py
Guillaume Lostis ef8a82fd08 Runner fixture (#1853)
* Use runner fixture in all tests

* Remove unused imports and args from some tests
2019-12-19 15:37:59 -07:00

19 lines
562 B
Python

from pkg_resources import iter_entry_points
import rasterio
from rasterio.rio.main import main_group
def test_version(runner):
result = runner.invoke(main_group, ['--version'])
assert result.exit_code == 0
assert rasterio.__version__ in result.output
def test_all_registered():
# This test makes sure that all of the subcommands defined in the
# rasterio.rio_commands entry-point are actually registered to the main
# cli group.
for ep in iter_entry_points('rasterio.rio_commands'):
assert ep.name in main_group.commands