use pytest expect exception