chriscarrollsmith / imfp

Python package for downloading economic data from the International Monetary Fund JSON RESTful API endpoint.
Apache License 2.0
10 stars 3 forks source link

Long-running tests #4

Open chriscarrollsmith opened 4 months ago

chriscarrollsmith commented 4 months ago

The unit tests, especially test_utils.py, are running very slowly. Now that we're using cached responses for the tests, there's no good reason for the long-running tests. I suspect the length of runtime is due to conservative wait time parameters left over from when we were using live API calls during testing. Reducing test runtime is probably as simple as changing these parameters.

chriscarrollsmith commented 4 months ago

I also think that long-running test workflows in Github Actions workflows are partly due to the install time of responses and its dependencies. This will be resolved if I can generate mocks programmatically rather than use mocks captured with responses. (I also would like to add a test that checks that API responses still match the spec I'm using for mock generation.