Skip to content

Commit

Permalink
Merge pull request #17 from philiporlando/add-missing-inputs-tests
Browse files Browse the repository at this point in the history
Add missing inputs tests
  • Loading branch information
philiporlando authored Jan 1, 2024
2 parents 8ed9725 + bad7b5c commit 4a86a2b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions fgdb_to_gpkg/fgdb_to_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def fgdb_to_gpkg(

except Exception as e:
print(f"Error converting {fgdb_path} to {gpkg_path}: {e}")
raise


if __name__ == "__main__":
Expand Down
19 changes: 18 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ numpy = "^1.26.0"
[tool.poetry.group.dev.dependencies]
pytest = "^7.2.2"
pytest-cov = "^4.0.0"
pytest-mock = "^3.12.0"

[build-system]
requires = ["poetry-core"]
Expand Down
6 changes: 6 additions & 0 deletions tests/test_fgdb_to_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,9 @@ def test_layer_already_exists(setup_fgdb_gpkg: tuple[str, str, Literal["test_fc"
# This should raise a warning because the layers already exists
with pytest.warns(UserWarning) as record:
fgdb_to_gpkg(fgdb_path, gpkg_path, overwrite=False)


def test_fgdb_to_gpkg_missing_inputs():
# Test that a type error is raised when no positional arguments are passed
with pytest.raises(TypeError):
fgdb_to_gpkg()

0 comments on commit 4a86a2b

Please sign in to comment.