thegraphnetwork / epigraphhub_py

Epigraphhub Python package
GNU General Public License v3.0
2 stars 9 forks source link

Unity Tests: Coverage and enhancement #204

Closed luabida closed 1 year ago

luabida commented 1 year ago

⚙️ Refactor Request

This issue aims to scrape the epigraphhub library, searching for untested methods, including them into unitary tests. Also refactor the tests structure to embrace issue #202

🔈 Motivation

Following best practices, every end-point method should be included in the unitary test coverage. It is also a good idea to have a well defined unity tests structure, so it could be easily reproducible for new functionalities.

🛰 Alternatives

I don't have any coverage framework in mind, if someone knows a good one, please link it in this issue.

📎 Additional context

luabida commented 1 year ago

@xmnlab I have a question about this subject. When we talk about methods that use the database to insert or request data, what should be the best practice in this case? Should the tests be able to interact with the sql server?

xmnlab commented 1 year ago

Normally we have a database on CI for that purpose

luabida commented 1 year ago

You mean a postgres on docker to be build with all the structure, ready to use in the tests?

xmnlab commented 1 year ago

Yep ... normally we don't need to test with all data. Sometimes just a synthetic data or some few rows are enough for the tests

github-actions[bot] commented 1 year ago

Stale issue message