Add support for PyPy.
Use functions and =assert= instead of =TestCase=
Merge branch 'flat-tests'