BUG: fix tests under Python 3

DeprecationWarning is skipped by default in Python 3