skinny.

Latest / Talk Python To Me

#287: Testing without dependencies, mocking in Python

See the full show notes for this episode on the website at talkpython.fm/287

Log in to save or queue this episode.

Short listen plan

No short plan yet. We need saved quotes in chapters with known start and end times, backed by a timed transcript.

The skinny

The skinny isn't ready yet — the transcript is, and you can read it now.

We know our tests should be relatively independent from other parts of the system. For example, running a test shouldn't generally call a credit card processing API and talk to a database when our goal is just to test the argument validation. And yet, your method that you want to test, it does all three of those things and more. What do you do? Some languages use elaborate dependency passing mechanisms and frameworks that go under the banner of inversion… continue reading