avoid float comparison in test
Fix py3 < 3.4 issue