-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Needs TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsOutput-Formatting__repr__ of pandas objects, to_string__repr__ of pandas objects, to_stringPeriodPeriod data typePeriod data type
Description
@MarcoGorelli suggested in #51459 (review) to add more tests for Period repr before #51459 can be merged.
What I'm most concerned about is that not all these reprs seems to be explicitly tested for. Some of them are, e.g.
pandas/pandas/tests/scalar/period/test_period.py
Lines 711 to 719 in 044227f
def test_millisecond_repr(self): p = Period("2000-01-01 12:15:02.123") assert repr(p) == "Period('2000-01-01 12:15:02.123', 'L')" def test_microsecond_repr(self): p = Period("2000-01-01 12:15:02.123567") assert repr(p) == "Period('2000-01-01 12:15:02.123567', 'U')"
but thenFR_SEC
isn't (as far as I can tell).Reckon we should add such unit tests for each period group (perhaps in a separate PR, which we could get in very quickly)? That would give me much more confidence about merging this
MarcoGorelli
Metadata
Metadata
Assignees
Labels
Needs TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsOutput-Formatting__repr__ of pandas objects, to_string__repr__ of pandas objects, to_stringPeriodPeriod data typePeriod data type