Introduce testing framework using pytest

I'd suggest rather than using blockquotes, do four spaces of indentation, which makes it a code block. This stays consistent with the rest of the docs.