diff --git a/pandas/tests/arithmetic/test_numeric.py b/pandas/tests/arithmetic/test_numeric.py index 172c29b951001..256ee930b4cda 100644 --- a/pandas/tests/arithmetic/test_numeric.py +++ b/pandas/tests/arithmetic/test_numeric.py @@ -712,10 +712,9 @@ def test_datetime64_with_index(self): tm.assert_series_equal(df['result'], df['expected'], check_names=False) # TODO: taken from tests.frame.test_operators, needs cleanup - def test_frame_operators(self): - seriesd = tm.getSeriesData() - frame = pd.DataFrame(seriesd) - frame2 = pd.DataFrame(seriesd, columns=['D', 'C', 'B', 'A']) + def test_frame_operators(self, float_frame): + frame = float_frame + frame2 = pd.DataFrame(float_frame, columns=['D', 'C', 'B', 'A']) garbage = np.random.random(4) colSeries = pd.Series(garbage, index=np.array(frame.columns)) diff --git a/pandas/tests/frame/test_operators.py b/pandas/tests/frame/test_operators.py index 95592f1ab3f0f..f1c8445bf98e0 100644 --- a/pandas/tests/frame/test_operators.py +++ b/pandas/tests/frame/test_operators.py @@ -48,9 +48,8 @@ def test_neg_raises(self, df): with pytest.raises(TypeError): (- df['a']) - def test_invert(self): - _seriesd = tm.getSeriesData() - df = pd.DataFrame(_seriesd) + def test_invert(self, float_frame): + df = float_frame assert_frame_equal(-(df < 0), ~(df < 0)) diff --git a/pandas/tests/groupby/conftest.py b/pandas/tests/groupby/conftest.py index cb4fe511651ee..3b636c87dc584 100644 --- a/pandas/tests/groupby/conftest.py +++ b/pandas/tests/groupby/conftest.py @@ -30,21 +30,11 @@ def ts(): return tm.makeTimeSeries() -@pytest.fixture -def seriesd(): - return tm.getSeriesData() - - @pytest.fixture def tsd(): return tm.getTimeSeriesData() -@pytest.fixture -def frame(seriesd): - return DataFrame(seriesd) - - @pytest.fixture def tsframe(tsd): return DataFrame(tsd) diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index b7abef9357072..87b57b0609b36 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -1306,12 +1306,12 @@ def test_skip_group_keys(): assert_series_equal(result, expected) -def test_no_nonsense_name(frame): +def test_no_nonsense_name(float_frame): # GH #995 - s = frame['C'].copy() + s = float_frame['C'].copy() s.name = None - result = s.groupby(frame['A']).agg(np.sum) + result = s.groupby(float_frame['A']).agg(np.sum) assert result.name is None diff --git a/pandas/tests/indexing/test_ix.py b/pandas/tests/indexing/test_ix.py index d56894a8c1f7b..270fa8c5502a6 100644 --- a/pandas/tests/indexing/test_ix.py +++ b/pandas/tests/indexing/test_ix.py @@ -182,9 +182,9 @@ def test_ix_weird_slicing(self): 4: 5}}) tm.assert_frame_equal(df, expected) - def test_ix_assign_column_mixed(self): + def test_ix_assign_column_mixed(self, float_frame): # GH #1142 - df = DataFrame(tm.getSeriesData()) + df = float_frame df['foo'] = 'bar' orig = df.loc[:, 'B'].copy() diff --git a/pandas/tests/io/formats/test_to_html.py b/pandas/tests/io/formats/test_to_html.py index 9666bc4977587..97d51f079fb2d 100644 --- a/pandas/tests/io/formats/test_to_html.py +++ b/pandas/tests/io/formats/test_to_html.py @@ -287,9 +287,8 @@ def test_to_html_with_no_bold(): assert 'B' not in result