Contribute Media
A thank you to everyone who has made this possible: Read More

Unit testing in the Scientific Python stack

Description

Unit testing in the Scientific Python stack by Antti Kaihola

Writing unit tests for algorithms and data processing pipelines poses challenges distinct from those in the web or desktop application domain. A key reason for poor unit test coverage is that writing tests is hard and laborious.

In this talk, I'll show some real-life unit test scenarios from Eniram along with tools we have developed to ease writing good tests. Many of the presented techniques also apply in other domains besides data processing.

Topics will include some or all of:

short overview of NumPy and Pandas testing tools Eniram's testing tools for asserting vector data enhanced parametrized tests two-dimensional parametrized tests asserting mixed values and exceptions readable diffs for text block assertions discovery of configurations and input data for running data processing tests

About the author: Antti Kaihola is a Python developer working in the Infrastructure team at Eniram. He's been with Python for 17 years, first for web development and scripting before moving into data processing. Building a platform for data processing using great Open Source components keeps Antti and his colleagues busy at work. At home, he occasionally spices family life with a microcontroller here and some MicroPython there, or encourages his kids to experiment with programming and robotics.

Details

Improve this page