Closed turnerm closed 3 years ago
Also for ecmwf see #84
I would suggest using pytest for unit testing as it offers a superset of features available in the basic unit testing of Python. Its assert x == y
form is easier to read than self.assertEquals(x, y)
and it has some nice fixtures and monkey patching features among other things.
eg.
https://github.com/OCHA-DAP/hdx-python-utilities/blob/master/tests/hdx/utilities/test_dateparse.py
https://github.com/OCHA-DAP/hdx-python-utilities/blob/master/tests/hdx/utilities/test_path.py
A standard Python setup for running flake8 linting and tests in GitHub Actions with coverage sent to coveralls.io is: https://github.com/OCHA-DAP/hdx-data-freshness/blob/master/.github/workflows/run-python-tests.yml
To be addressed in hackathon
Add unit tests, particularly focusing on: