Testing and data can get a little tricky. Check these out:
Automate your data analysis testing (Stephen Childs) https://www.youtube.com/watch?v=ovvU41ve1FQ
https://penandpants.com/2014/10/07/testing-with-numpy-and-pandas/
Datacamp course covering the use of Unit tests in Python for Data Science https://www.datacamp.com/courses/unit-testing-for-data-science-in-python