rasterio/tests/test_cli_main.py
Sean Gillies 64b6fe03b7
Numpy 2 compatibility (#3061)
* Numpy 2 compatibility

* Update PR ref in change log

* Add missing vsiopener test dependencies

* Change log update
2024-04-08 16:04:02 -06:00

19 lines
583 B
Python

"""Tests CLI command version and entry points."""
import rasterio
from rasterio.rio.main import entry_points, 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 entry_points(group="rasterio.rio_commands"):
assert ep.name in main_group.commands