fix tests under pypy