diff --git a/pandas/tests/series/test_validate.py b/pandas/tests/series/test_validate.py index a0cde5f81d021..8c4b6ee5b1d75 100644 --- a/pandas/tests/series/test_validate.py +++ b/pandas/tests/series/test_validate.py @@ -1,14 +1,7 @@ -from pandas.core.series import Series - import pytest import pandas.util.testing as tm -@pytest.fixture -def series(): - return Series([1, 2, 3, 4, 5]) - - class TestSeriesValidate(object): """Tests for error handling related to data types of method arguments.""" @@ -16,7 +9,7 @@ class TestSeriesValidate(object): "sort_values", "sort_index", "rename", "dropna"]) @pytest.mark.parametrize("inplace", [1, "True", [1, 2, 3], 5.0]) - def test_validate_bool_args(self, series, func, inplace): + def test_validate_bool_args(self, string_series, func, inplace): msg = "For argument \"inplace\" expected type bool" kwargs = dict(inplace=inplace) @@ -24,4 +17,4 @@ def test_validate_bool_args(self, series, func, inplace): kwargs["name"] = "hello" with tm.assert_raises_regex(ValueError, msg): - getattr(series, func)(**kwargs) + getattr(string_series, func)(**kwargs)