Pytest with Eric

Learn to write production level Python Unit Tests with Pytest

So you’re a backend developer or data engineer and probably stumbled across this article when looking to speed up your Unit Tests.

TDD (Test driven development) is the practice of writing unit tests alongside the actual source code.

Why? Because it makes you think of edge cases and functionality you generally don’t think of when writing source code.

That’s great. But what about running these tests? Maybe 100s of tests?

Read more »

Have you heard of monkeypatch but have no idea what it means?

Or maybe you’ve even seen it in your company’s code base and wondered why your colleagues use it.

Rather than go through complex documentation or a bunch of Stack Overflow posts, let’s understand what is monkeypatching at a high level and when and how we can use it to improve Unit Testing.

Read more »

So you’re tasked with building a service that talks to external REST API.

You use the Requests or similar library, whip up some GET or POST methods and voila! All done.

Easy peasy, right?

Well not so. If you’re doing it for a hobby or quick side project then yes.

But as a professional developer, you know that you’ve to account for all edge cases.

The challenge when dealing with external APIs is that the behaviour is outside your control.

Schema or payload changes, new error codes, and updated speed caps are some problems that may plague you.

Read more »
0%