diff --git a/pandas/conftest.py b/pandas/conftest.py index 16b6d40645547..11bb16fc0a3a9 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -297,6 +297,10 @@ def index_or_series(request): return request.param +# Generate cartesian product of index_or_series fixture: +index_or_series2 = index_or_series + + @pytest.fixture def dict_subclass(): """ diff --git a/pandas/tests/test_strings.py b/pandas/tests/test_strings.py index 6260d13524da3..35786ce64ac15 100644 --- a/pandas/tests/test_strings.py +++ b/pandas/tests/test_strings.py @@ -671,14 +671,10 @@ def test_str_cat_align_mixed_inputs(self, join): with pytest.raises(ValueError, match=rgx): s.str.cat([t, z], join=join) - index_or_series2 = [Series, Index] # type: ignore - # List item 0 has incompatible type "Type[Series]"; expected "Type[PandasObject]" - # See GH#29725 - - @pytest.mark.parametrize("other", index_or_series2) - def test_str_cat_all_na(self, index_or_series, other): + def test_str_cat_all_na(self, index_or_series, index_or_series2): # GH 24044 box = index_or_series + other = index_or_series2 # check that all NaNs in caller / target work s = Index(["a", "b", "c", "d"])