Tests infrastructure

* fixed setup.py
* python 3 fixes