Sunday 1:30 PM–3:00 PM in Popovich Hall, Room 110

Testing with Pytest for Data Science

Ravin Kumar 🌴

Audience level:
Novice

Description

Unit Testing isn't just for traditional applications. Testing is useful in data applications as well, from testing assumptions about the underlying structure of information, to testing your knowledge of math libraries.

In this tutorial we'll showing you how to use pytest from scratch. By the end you'll know enough to be able to use it in your next project.

Abstract

This tutorial is intended to take someone unfamiliar with testing, and by the end have them writing functional and useful tests. The tutorial will be a series of exercises introducing various concepts in testing. By the end you should have a good idea of where and how to implement testing in your next project

You're encouraged to participate

This will be an interactive tutorial where attendees are encouraged to bring their laptops. Code will be provided, please be sure to install python 3 and pytest before the tutorial to avoid issues at the tutorial itself.

A git repository with all the code used will be made available during the tutorial.

Topics covered

We'll be answering the questions

Testing basics

What is testing? Why is it useful in general? Why is it useful in a data context?

Libraries

What are the available libraries for python?

Your first test

How do I structure my first test? How do I run a test?

Your first fixture

What are fixtures? How do I use them? When should I use them?

Extra cool functionality

What are the more advanced features of pytest? What should I look for, for future learning?

Subscribe to Receive PyData Updates

Subscribe