Analytics Vidhya
Published in

Analytics Vidhya

How to Write Tests For Your Data Science Code

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!



Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store