Skip to content

Commit

Permalink
Implemented --version, closes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 13, 2022
1 parent bea5137 commit 23bdb74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions geojson_to_sqlite/cli.py
Expand Up @@ -7,6 +7,7 @@


@click.command()
@click.version_option()
@click.argument(
"db_path",
type=click.Path(file_okay=True, dir_okay=False, allow_dash=False),
Expand Down
6 changes: 6 additions & 0 deletions tests/test_geojson_to_sqlite.py
Expand Up @@ -11,6 +11,12 @@
testdir = pathlib.Path(__file__).parent


def test_version():
result = CliRunner().invoke(cli.cli, ["--version"])
assert result.exit_code == 0
assert result.output.startswith("cli, version ")


def test_invalid(tmpdir):
db_path = str(tmpdir / "output.db")
result = CliRunner().invoke(
Expand Down

0 comments on commit 23bdb74

Please sign in to comment.