There are some interesting python tricks in this test playground repo.
Python3 required:
$ python3.5 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ make tests
PS: Big thanks to David Beazley and Brian K. Jones. Python Cookbook is awesome.