Skip to content

Commit edd20bc

Browse files
committed
no warning expected
1 parent f5764db commit edd20bc

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

pandas/tests/series/test_arithmetic.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import pytest
1111

1212
from pandas._libs import lib
13-
from pandas.compat._optional import import_optional_dependency
1413

1514
import pandas as pd
1615
from pandas import (
@@ -26,7 +25,6 @@
2625
import pandas._testing as tm
2726
from pandas.core import ops
2827
from pandas.core.computation import expressions as expr
29-
from pandas.util.version import Version
3028

3129

3230
@pytest.fixture(autouse=True, params=[0, 1000000], ids=["numexpr", "python"])
@@ -347,25 +345,14 @@ def test_add_list_to_masked_array(self, val):
347345
result = [1, None, val] + ser
348346
tm.assert_series_equal(result, expected)
349347

350-
def test_add_list_to_masked_array_boolean(self, request):
348+
def test_add_list_to_masked_array_boolean(self):
351349
# GH#22962
352-
ne = import_optional_dependency("numexpr", errors="ignore")
353-
warning = (
354-
UserWarning
355-
if request.node.callspec.id == "numexpr"
356-
and ne
357-
and Version(ne.__version__) < Version("2.13.1")
358-
else None
359-
)
360350
ser = Series([True, None, False], dtype="boolean")
361-
msg = "operator is not supported by numexpr for the bool dtype"
362-
with tm.assert_produces_warning(warning, match=msg):
363-
result = ser + [True, None, True]
351+
result = ser + [True, None, True]
364352
expected = Series([2, pd.NA, 1], dtype=object)
365353
tm.assert_series_equal(result, expected)
366354

367-
with tm.assert_produces_warning(warning, match=msg):
368-
result = [True, None, True] + ser
355+
result = [True, None, True] + ser
369356
tm.assert_series_equal(result, expected)
370357

371358

0 commit comments

Comments
 (0)