Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage using pytest-cov #5

Open
philiporlando opened this issue Mar 30, 2023 · 3 comments
Open

Add test coverage using pytest-cov #5

philiporlando opened this issue Mar 30, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@philiporlando
Copy link
Owner

Need to incorporate test coverage:

poetry add pytest-cov --dev
poetry run pytest --cov=fgdb_to_gpkg tests/
@philiporlando philiporlando self-assigned this Mar 30, 2023
@philiporlando philiporlando added the enhancement New feature or request label Mar 30, 2023
@philiporlando
Copy link
Owner Author

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
Copy link
Owner Author

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

test-cov

@philiporlando
Copy link
Owner Author

Consider adding github action to check for code coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant