Skip to content

Remove TestData from series-tests test_replace.py #29147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions pandas/tests/series/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
import pandas as pd
import pandas.util.testing as tm

from .common import TestData


class TestSeriesReplace(TestData):
def test_replace(self):
class TestSeriesReplace:
def test_replace(self, datetime_series):
N = 100
ser = pd.Series(np.random.randn(N))
ser[0:4] = np.nan
Expand Down Expand Up @@ -65,7 +63,7 @@ def test_replace(self):
filled[4] = 0
tm.assert_series_equal(ser.replace(np.inf, 0), filled)

ser = pd.Series(self.ts.index)
ser = pd.Series(datetime_series.index)
tm.assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))

# malformed
Expand Down