Skip to content

Commit 1e03542

Browse files
committed
ignore pytables usage, update xfail condition
1 parent b382f1a commit 1e03542

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

pandas/tests/io/pytables/test_complex.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def test_complex_mixed_fixed(tmp_path, setup_path):
8282
tm.assert_frame_equal(df, reread)
8383

8484

85+
@pytest.mark.filterwarnings(
86+
"ignore:`alltrue` is deprecated as of NumPy 1.25.0:DeprecationWarning"
87+
)
8588
def test_complex_mixed_table(tmp_path, setup_path):
8689
complex64 = np.array(
8790
[1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j], dtype=np.complex64

pandas/tests/io/pytables/test_timezones.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ def _compare_with_tz(a, b):
4242
gettz_pytz = lambda x: x
4343

4444

45+
@pytest.mark.filterwarnings(
46+
"ignore:`alltrue` is deprecated as of NumPy 1.25.0:DeprecationWarning"
47+
)
4548
@pytest.mark.parametrize("gettz", [gettz_dateutil, gettz_pytz])
4649
def test_append_with_timezones(setup_path, gettz):
4750
# as columns
@@ -332,6 +335,9 @@ def test_dst_transitions(setup_path):
332335
tm.assert_frame_equal(result, df)
333336

334337

338+
@pytest.mark.filterwarnings(
339+
"ignore:`alltrue` is deprecated as of NumPy 1.25.0:DeprecationWarning"
340+
)
335341
def test_read_with_where_tz_aware_index(tmp_path, setup_path):
336342
# GH 11926
337343
periods = 10

pandas/tests/series/indexing/test_setitem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
datetime,
55
)
66
from decimal import Decimal
7-
import os
87

98
import numpy as np
109
import pytest
1110

11+
from pandas.compat.numpy import np_version_gt2
1212
from pandas.errors import IndexingError
1313

1414
from pandas.core.dtypes.common import is_list_like
@@ -1440,7 +1440,7 @@ def obj(self):
14401440
np.float32,
14411441
False,
14421442
marks=pytest.mark.xfail(
1443-
os.environ.get("NPY_PROMOTION_STATE", "weak") != "weak",
1443+
not np_version_gt2,
14441444
reason="np.float32(1.1) ends up as 1.100000023841858, so "
14451445
"np_can_hold_element raises and we cast to float64",
14461446
),

0 commit comments

Comments
 (0)