Reduce/Remove network calls from unittests #2136
ericpien
started this conversation in
Development
Replies: 1 comment
-
Not really. Changes can be geographical, or only when Yahoo under high load so temporary.
Sounds good and can improve some tests. Can you update/prototype one test to show what it looks like? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Moving discussion from #2093 (comment) to not spam everyone involved.
@ValueRaider If we mock the network calls in the unittests, we could reduce the time required for testing and avoid spamming yahoo (i.e. save the response as
.pkl
and read the mock data instead of fetching).I think an advantage of keeping them a network call is that we could catch changes in yahoo finance API responses. However, that isn't really the purpose of unittests and we wouldn't catch such changes in the absence of running unittests when pushing to
main/dev
anyway.Do you think this is worth trying?
Beta Was this translation helpful? Give feedback.
All reactions