The code assumes a directory structure of <repo>/tests/<these files>, with the original source from https://gist.github.com/kunalb/0a17f1221cb03612c01c288326cb432d available at <repo>/ttt.
Run the tests with python -m unittest tests/*.py in <repo>.