python: fix to_x() & to_x_32() in test.py