How to Write Tests For Your Data Science Code

Joos Korstanje
Dec 23, 2019 · 3 min read

Last week, a coworker called me up with an urgent demand. A bug in a program that was developed a while ago and hadn’t been looked at since.

Writing automated test cases for your code is a must!

I looked at the code and found the problem. The script imported a function from somewhere else, but the data returned by this function was in a different format than it was before.

The problem: an update to the external function without running any testing!