python 3 compatible class equality assertion in tests