gicait / geoserver-rest

Python library for management of geospatial data in GeoServer.
https://geoserver-rest.readthedocs.io
MIT License
196 stars 77 forks source link

Use pytest and coverage #45

Closed Zeitsperre closed 3 months ago

Zeitsperre commented 3 years ago

I can see that a file package_test.py is in the top-level, but we could potentially make use of pytest to make the testing process much more standardized.

Testing for code coverage (https://pypi.org/project/pytest-cov/) might also be of interest for maintainability. If this is of interest, let me know.

iamtekson commented 3 years ago

Yes, you are right. We can add the pytest to make the testing process. But I am not familiar with this tool. You can please proceed. We can discuss further if you need any clearification.

dvignoles commented 3 years ago

I noticed that the tests contain hard coded file paths . Would it make sense to instead include the testing data as part of the repository? Or perhaps reference some data publicly available on the web?

In terms of integration testing with geoserver, it might also make sense to spin up a geoserver docker container as part of the test run. There's a library pytest-docker for just that sort of thing.

Let me know what you think. This package has been super helpful for me already and I'd like to contribute!

iamtekson commented 3 years ago

Hi @dvignoles, Thank you for addressing this issue. Please sure you can integrate the docker container as a part of the test run. Thank you.

iamtekson commented 3 months ago

I think this is resolved now with #151. I will also close this issue for now.