split test py2/3

`tests.py` have bug on py3. so I split test case by `sys.version_info`.