philiporlando / fgdb_to_gpkg

Simple python package that converts all feature classes within an Esri FileGeoDataBase into layers within a GeoPackage.
GNU General Public License v3.0
4 stars 1 forks source link

Add test coverage using pytest-cov #5

Open philiporlando opened 1 year ago

philiporlando commented 1 year ago

Need to incorporate test coverage:

poetry add pytest-cov --dev
poetry run pytest --cov=fgdb_to_gpkg tests/
philiporlando commented 1 year ago

Seeing less than 100% test coverage using this tool. Need to read more about pytest-cov and see if it's the if __name__ == "__main__" block of code that is being interpreted as uncovered...

tests/test_fgdb_to_gpkg.py .                                                                                                             [100%]

---------- coverage: platform linux, python 3.10.6-final-0 -----------
Name                           Stmts   Miss  Cover
--------------------------------------------------
fgdb_to_gpkg/__init__.py           2      0   100%
fgdb_to_gpkg/fgdb_to_gpkg.py      27     10    63%
--------------------------------------------------
TOTAL                             29     10    66%
philiporlando commented 10 months ago

Test coverage has increased to 72% after merging #9.

test-cov

philiporlando commented 10 months ago

Consider adding github action to check for code coverage.