|
10 | 10 | import pytest |
11 | 11 |
|
12 | 12 | from pandas._libs import lib |
13 | | -from pandas.compat._optional import import_optional_dependency |
14 | 13 |
|
15 | 14 | import pandas as pd |
16 | 15 | from pandas import ( |
|
26 | 25 | import pandas._testing as tm |
27 | 26 | from pandas.core import ops |
28 | 27 | from pandas.core.computation import expressions as expr |
29 | | -from pandas.util.version import Version |
30 | 28 |
|
31 | 29 |
|
32 | 30 | @pytest.fixture(autouse=True, params=[0, 1000000], ids=["numexpr", "python"]) |
@@ -347,25 +345,14 @@ def test_add_list_to_masked_array(self, val): |
347 | 345 | result = [1, None, val] + ser |
348 | 346 | tm.assert_series_equal(result, expected) |
349 | 347 |
|
350 | | - def test_add_list_to_masked_array_boolean(self, request): |
| 348 | + def test_add_list_to_masked_array_boolean(self): |
351 | 349 | # 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 | | - ) |
360 | 350 | 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] |
364 | 352 | expected = Series([2, pd.NA, 1], dtype=object) |
365 | 353 | tm.assert_series_equal(result, expected) |
366 | 354 |
|
367 | | - with tm.assert_produces_warning(warning, match=msg): |
368 | | - result = [True, None, True] + ser |
| 355 | + result = [True, None, True] + ser |
369 | 356 | tm.assert_series_equal(result, expected) |
370 | 357 |
|
371 | 358 |
|
|
0 commit comments