Skip to content

Commit f03ccec

Browse files
committed
no warning expected
1 parent 9c32475 commit f03ccec

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
@@ -14,7 +14,6 @@
1414
import pytest
1515

1616
from pandas._libs import lib
17-
from pandas.compat._optional import import_optional_dependency
1817

1918
import pandas as pd
2019
from pandas import (
@@ -30,7 +29,6 @@
3029
import pandas._testing as tm
3130
from pandas.core import ops
3231
from pandas.core.computation import expressions as expr
33-
from pandas.util.version import Version
3432

3533

3634
@pytest.fixture(autouse=True, params=[0, 1000000], ids=["numexpr", "python"])
@@ -369,25 +367,14 @@ def test_add_list_to_masked_array(self, val):
369367
result = [1, None, val] + ser
370368
tm.assert_series_equal(result, expected)
371369

372-
def test_add_list_to_masked_array_boolean(self, request):
370+
def test_add_list_to_masked_array_boolean(self):
373371
# GH#22962
374-
ne = import_optional_dependency("numexpr", errors="ignore")
375-
warning = (
376-
UserWarning
377-
if request.node.callspec.id == "numexpr"
378-
and ne
379-
and Version(ne.__version__) < Version("2.13.1")
380-
else None
381-
)
382372
ser = Series([True, None, False], dtype="boolean")
383-
msg = "operator is not supported by numexpr for the bool dtype"
384-
with tm.assert_produces_warning(warning, match=msg):
385-
result = ser + [True, None, True]
373+
result = ser + [True, None, True]
386374
expected = Series([2, pd.NA, 1], dtype=object)
387375
tm.assert_series_equal(result, expected)
388376

389-
with tm.assert_produces_warning(warning, match=msg):
390-
result = [True, None, True] + ser
377+
result = [True, None, True] + ser
391378
tm.assert_series_equal(result, expected)
392379

393380

0 commit comments

Comments
 (0)