BUG: pytz.AmbiguousTimeError not caught in hypothesis test_on_offset_implementations
#41906
Closed
2 of 3 tasks
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
(Hypothesis) Test name:
test_on_offset_implementations
Test location:
pandas/tests/tseries/offsets/test_offsets_properties.py
The following pair of test inputs at some point came up as failed for the hypothesis test in the checks for #41488, with
pytz.AmbiguousTimeError
.I didn't get the blob for
@reproduce_failure
, but we can similarly reproduce with@example
as follows. Please let me know if there is less messy, more copy-and-paste-able way to reproduce the test failure.Expected Output
dt + offset
yieldspd.Timestamp('1905-07-01', tzinfo=pytz.timezone('Africa/Kinshasa'))
, which I think is correctly an DST-ambiguous timestamp given the followingpytz
specifications. So we should probably catch the exception and directly assume(False).Actual Output
Problem description
See above.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: