Toot

Written by Josh Rivers on 2024-12-07 at 18:16

@pamelafox I’ve done a lot of mocking in Python and other langs and I am changing my practice. Beyond specific types of fault injection or obscure branch behavior checks, I want to be using fakes. A lot of rework in my past could have been avoided if I wrote my tests as integration tests against multiple modules rather than unit tests a function at a time. I am now trying to enable that through accurate behavior fakes at the right levels of my applications so the tests work against a “real” flow of the code (like using moto instead of MagicMock). The Google SDEV handbook has a good section on testing that speaks to this philosophy (it’s a little over-declarative and chest thumping, and written for a Java shop, but the discussion has a lot of insights)

=> More informations about this toot | View the thread | More toots from joshrivers@techhub.social

Mentions

=> View pamelafox@fosstodon.org profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113612906779614359
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
234.813381 milliseconds
Gemini-to-HTML Time
0.714255 milliseconds

This content has been proxied by September (3851b).