Sunday 9 a.m.–12:20 p.m.
Introduction to Unit Testing in Python with Pytest
- Audience level:
In this tutorial we’ll be taking you on a journey into the wonderful land of unit testing with pytest. We’ll be taking a step by step approach by iteratively adding unit test coverage to our awesome Cat In A Box™ project. You will also get a crash course on Git, Github, virtualenvs, and test automation. By the end, we hope that you’ll have a desire to bring testing to our own projects!
## Learning Objectives - What tests are and why they are important - What unit tests are and why you should write them - How to approach writing unit tests - Why you need test automation - Some ways to measure code / test quality - Why pytest is awesome and how it helps you test better - Mocking, fixtures, and parametrization - oh my! - Hopefully none of our bad habits :) ## Prerequisites Students should have at least a novice to beginner level understanding of Python. No prior experience with testing (in general or with Python) is required as we'll be starting from basics. We also ask that students have the following on their laptop: - Python 2.7 or 3.4+ - Git - Pip and Virtualenv  It would also be beneficial with students can create a Github account (and attach their SSH key) beforehand, and to fork and clone [our repo](https://github.com/keeppythonweird/catinabox).  Windows users should also considering installing the Community Edition of [PyCharm](https://www.jetbrains.com/pycharm/) as it simplifies getting both Pip and Virtualenv.
No handouts have been provided yet for this tutorial