Skip to content

Commit

Permalink
Add xfail mark to tests failing on pandas bug
Browse files Browse the repository at this point in the history
Adds xfail mark to 2 tests failing as a result of a bug in pandas
(see comments in tests code for details). Bug manifests in tests,
not in package. Bug should be fixed from pandas version after
2.2.2. Should then be able to remove the xfail.
  • Loading branch information
maread99 committed Jun 25, 2024
1 parent 30ce7a3 commit 2f85f48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ def test_volume_to_na(intraday_pt, intraday_pt_ss):
assert_frame_equal(rtrn, df)


# TODO Remove xfail when pandas >2.2 released
# NB pd bug manifests in test, not package (manifests where evaluate
# `expected_ooo.index = df[::12]`)
# pandas issue ref is https://github.com/pandas-dev/pandas/issues/58604
@pytest.mark.xfail(reason="Known pd issue with py3.12, should resolve with pd>2.2")
def test_resample(intraday_pt):
"""Test `resample`.
Expand Down
5 changes: 5 additions & 0 deletions tests/test_pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,11 @@ def test_cbday_freq(self, daily_pt_ss, xnys):
df.pt.downsample("3d", xnys),
)

# TODO Remove xfail when pandas >2.2 released
# NB pd bug manifests in test, not package (manifests where takes a slice to
# evaluate 'subset').
# pandas issue ref is https://github.com/pandas-dev/pandas/issues/58604
@pytest.mark.xfail(reason="Known pd issue with py3.12, should resolve with pd>2.2")
def test_monthly_freq(self, daily_pt, xnys, x247, one_day, symbols):
"""Verify "MS" and "QS" frequencies."""
df = daily_pt
Expand Down

0 comments on commit 2f85f48

Please sign in to comment.