Skip to content

Commit 1fb6ff6

Browse files
winklerandjreback
authored andcommitted
TST: set fixtures to default function scoping
1 parent 3964fc4 commit 1fb6ff6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pandas/tests/test_resample.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -702,27 +702,28 @@ def create_index(self, *args, **kwargs):
702702
_index_fixture_end = datetime(2005, 1, 10)
703703
_index_fixture_freq = 'D'
704704

705-
@pytest.fixture(scope='class')
705+
@pytest.fixture
706706
def index(self):
707707
return self.create_index(self._index_fixture_start,
708708
self._index_fixture_end,
709709
freq=self._index_fixture_freq)
710710

711-
@pytest.fixture(scope='class')
711+
@pytest.fixture
712712
def series(self, index):
713713
return Series(np.arange(len(index)), index=index,
714714
name=self._series_fixture_name)
715715

716-
@pytest.fixture(scope='class')
716+
@pytest.fixture
717717
def frame(self, index):
718718
return DataFrame({'value': np.arange(len(index))}, index=index)
719719

720-
@pytest.fixture(params=[Series, DataFrame], scope='class')
720+
@pytest.fixture(params=[Series, DataFrame])
721721
def series_and_frame(self, request, index):
722722
if request.param == Series:
723-
return self.series(index)
723+
return Series(np.arange(len(index)), index=index,
724+
name=self._series_fixture_name)
724725
if request.param == DataFrame:
725-
return self.frame(index)
726+
return DataFrame({'value': np.arange(len(index))}, index=index)
726727

727728
@pytest.mark.parametrize('freq', ['2D', '1H'])
728729
def test_asfreq(self, series_and_frame, freq):

0 commit comments

Comments
 (0)