pytest format tests have more functionality and are a bit cleaner.
The failing test was due to OneOfASet._estrict_date() potentially returning inf or -inf. This fixes the logic there to return inf or -inf if an inf or -inf are in the set with a LATEST or EARLIEST lean, respectively. It returns before making the comparison that was previously failing (TypeError: '>' not supported between instances of 'float' and 'time.struct_time').
pytest
format tests have more functionality and are a bit cleaner.The failing test was due to
OneOfASet._estrict_date()
potentially returninginf
or-inf
. This fixes the logic there to returninf
or-inf
if aninf
or-inf
are in the set with aLATEST
orEARLIEST
lean, respectively. It returns before making the comparison that was previously failing (TypeError: '>' not supported between instances of 'float' and 'time.struct_time'
).