fix unittest import, skip lossy_float_conversion for python 3.x, and fix bytes