TST/BUG: use encoding for PY3