Skip to content

Commit

Permalink
Avoid pytest bug: 'filterwarnings' not a registered marker
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Jul 8, 2018
1 parent a39453c commit 69d0e81
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions pandas/tests/sparse/frame/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
from pandas.tests.frame.test_api import SharedWithSparse


pytestmark = pytest.mark.filterwarnings("ignore:Setting Sparse:PerformanceWarning")


class TestSparseDataFrame(SharedWithSparse):
klass = SparseDataFrame

Expand Down Expand Up @@ -1333,12 +1330,14 @@ def spindex_kind(request):
return request.param


@pytest.mark.filterwarnings("ignore:Setting Sparse")
@pytest.mark.parametrize('indexer', ['iat'])
@pytest.mark.parametrize('key', [(0, 0)])
def test_frame_assignment_at(spindex_kind, indexer, key):
_test_assignment(spindex_kind, indexer, key)


@pytest.mark.filterwarnings("ignore:Setting Sparse")
@pytest.mark.parametrize('indexer', ['at', 'loc', 'iloc'])
@pytest.mark.parametrize('key', [0,
[0, 1],
Expand All @@ -1347,17 +1346,15 @@ def test_frame_assignment_loc(spindex_kind, indexer, key):
_test_assignment(spindex_kind, indexer, key)


@pytest.mark.filterwarnings("ignore:Setting Sparse")
@pytest.mark.parametrize('key', [None,
[True, False]])
def test_frame_assignment_setitem(spindex_kind, key):
_test_assignment(spindex_kind, None, key)


@pytest.mark.filterwarnings("ignore:Setting Sparse")
@pytest.mark.parametrize('indexer', ['loc', 'at'])
@pytest.mark.parametrize('key', [3])
def test_frame_assignment_extend_index_loc(spindex_kind, key):
_test_assignment(spindex_kind, 'loc', key)


@pytest.mark.parametrize('key', [3])
def test_frame_assignment_extend_index_at(spindex_kind, key):
_test_assignment(spindex_kind, 'at', key)
def test_frame_assignment_extend_index_loc(spindex_kind, indexer, key):
_test_assignment(spindex_kind, indexer, key)

0 comments on commit 69d0e81

Please sign in to comment.