Skip to content

Commit e31c5ad

Browse files
nschloeWillAyd
authored andcommitted
COMPAT: numpy test warnings (pandas-dev#30345)
1 parent d77b1d8 commit e31c5ad

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pandas/tests/arrays/test_integer.py

+2
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ def test_astype_nansafe():
935935

936936

937937
@pytest.mark.parametrize("ufunc", [np.abs, np.sign])
938+
# np.sign emits a warning with nans, <https://github.com/numpy/numpy/issues/15127>
939+
@pytest.mark.filterwarnings("ignore:invalid value encountered in sign")
938940
def test_ufuncs_single_int(ufunc):
939941
a = integer_array([1, 2, -3, np.nan])
940942
result = ufunc(a)

pandas/tests/plotting/test_datetimelike.py

+6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ def setup_method(self, method):
4343
def teardown_method(self, method):
4444
tm.close()
4545

46+
# Ignore warning
47+
# ```
48+
# Converting to PeriodArray/Index representation will drop timezone information.
49+
# ```
50+
# which occurs for UTC-like timezones.
4651
@pytest.mark.slow
52+
@pytest.mark.filterwarnings("ignore:msg:UserWarning")
4753
def test_ts_plot_with_tz(self, tz_aware_fixture):
4854
# GH2877, GH17173
4955
tz = tz_aware_fixture

0 commit comments

Comments
 (0)