commit test for get_principal_repr and fix on py3