def test_repr_with_fitter(self, sample_lifetimes): T, C = sample_lifetimes bf = BaseFitter() bf.event_observed = C assert bf.__repr__( ) == '<lifelines.BaseFitter: fitted with %d observations, %d censored>' % ( C.shape[0], C.shape[0] - C.sum())
def test_repr_without_fitter(self): bf = BaseFitter() assert bf.__repr__() == '<lifelines.BaseFitter>'