Re:Ask HN: How to transition from academic programming to so...
by crackerjackmack on Tuesday September 11, 2018 @02:44PM
(#17962236)
In an example. NoopTelemetry would be some type of empty class not dependent on mock (I've used a meta class a singleton in this case, but whichever, could be a module just the same). To test, you'd pass in a mock object to telemetry and check that a both timer_start and timer_stop are both called with the correct function name.
In your main or context, you setup your application with the needed pieces.
In your main or context, you setup your application with the needed pieces.