switched to pyunit, separate tests and code