|
14 | 14 | import pytest |
15 | 15 |
|
16 | 16 | from pandas._libs import lib |
17 | | -from pandas.compat._optional import import_optional_dependency |
18 | 17 |
|
19 | 18 | import pandas as pd |
20 | 19 | from pandas import ( |
|
30 | 29 | import pandas._testing as tm |
31 | 30 | from pandas.core import ops |
32 | 31 | from pandas.core.computation import expressions as expr |
33 | | -from pandas.util.version import Version |
34 | 32 |
|
35 | 33 |
|
36 | 34 | @pytest.fixture(autouse=True, params=[0, 1000000], ids=["numexpr", "python"]) |
@@ -369,25 +367,14 @@ def test_add_list_to_masked_array(self, val): |
369 | 367 | result = [1, None, val] + ser |
370 | 368 | tm.assert_series_equal(result, expected) |
371 | 369 |
|
372 | | - def test_add_list_to_masked_array_boolean(self, request): |
| 370 | + def test_add_list_to_masked_array_boolean(self): |
373 | 371 | # 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 | | - ) |
382 | 372 | 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] |
386 | 374 | expected = Series([2, pd.NA, 1], dtype=object) |
387 | 375 | tm.assert_series_equal(result, expected) |
388 | 376 |
|
389 | | - with tm.assert_produces_warning(warning, match=msg): |
390 | | - result = [True, None, True] + ser |
| 377 | + result = [True, None, True] + ser |
391 | 378 | tm.assert_series_equal(result, expected) |
392 | 379 |
|
393 | 380 |
|
|
0 commit comments