Make raise test py3 compatible