Skip to content

Commit 008931a

Browse files
committed
shim
1 parent 7742e36 commit 008931a

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

pandas/tests/api/test_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class TestPDApi(Base):
8888
"NamedAgg",
8989
]
9090
if not compat.PY37:
91-
classes.append("Panel")
91+
classes.extend(["Panel", "SparseSeries", "SparseDataFrame"])
9292

9393
# these are already deprecated; awaiting removal
9494
deprecated_classes = []

pandas/tests/io/test_feather.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import numpy as np
55
import pytest
66

7-
import pandas.util._test_decorators as td
8-
97
import pandas as pd
108
import pandas.util.testing as tm
119
from pandas.util.testing import assert_frame_equal, ensure_clean
@@ -16,8 +14,10 @@
1614

1715

1816
pyarrow_version = LooseVersion(pyarrow.__version__)
17+
filter_sparse = pytest.mark.filterwarnings("ignore:The Sparse")
1918

2019

20+
@filter_sparse
2121
@pytest.mark.single
2222
class TestFeather:
2323
def check_error_on_write(self, df, exc):
@@ -50,7 +50,6 @@ def test_error(self):
5050
]:
5151
self.check_error_on_write(obj, ValueError)
5252

53-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
5453
def test_basic(self):
5554

5655
df = pd.DataFrame(
@@ -77,7 +76,6 @@ def test_basic(self):
7776
assert df.dttz.dtype.tz.zone == "US/Eastern"
7877
self.check_round_trip(df)
7978

80-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
8179
def test_duplicate_columns(self):
8280

8381
# https://github.com/wesm/feather/issues/53
@@ -90,7 +88,6 @@ def test_stringify_columns(self):
9088
df = pd.DataFrame(np.arange(12).reshape(4, 3)).copy()
9189
self.check_error_on_write(df, ValueError)
9290

93-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
9491
def test_read_columns(self):
9592
# GH 24025
9693
df = pd.DataFrame(
@@ -111,7 +108,6 @@ def test_unsupported_other(self):
111108
# Some versions raise ValueError, others raise ArrowInvalid.
112109
self.check_error_on_write(df, Exception)
113110

114-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
115111
def test_rw_nthreads(self):
116112
df = pd.DataFrame({"A": np.arange(100000)})
117113
expected_warning = (
@@ -129,13 +125,11 @@ def test_rw_nthreads(self):
129125
# we have an extra FutureWarnings because of #GH23752
130126
assert any(expected_warning in str(x) for x in w)
131127

132-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
133128
def test_rw_use_threads(self):
134129
df = pd.DataFrame({"A": np.arange(100000)})
135130
self.check_round_trip(df, use_threads=True)
136131
self.check_round_trip(df, use_threads=False)
137132

138-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
139133
def test_write_with_index(self):
140134

141135
df = pd.DataFrame({"A": [1, 2, 3]})
@@ -163,13 +157,11 @@ def test_write_with_index(self):
163157
df.columns = (pd.MultiIndex.from_tuples([("a", 1), ("a", 2), ("b", 1)]),)
164158
self.check_error_on_write(df, ValueError)
165159

166-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
167160
def test_path_pathlib(self):
168161
df = tm.makeDataFrame().reset_index()
169162
result = tm.round_trip_pathlib(df.to_feather, pd.read_feather)
170163
tm.assert_frame_equal(df, result)
171164

172-
@td.skip_if_no("pyarrow", "0.15.0") # Sparse removal
173165
def test_path_localpath(self):
174166
df = tm.makeDataFrame().reset_index()
175167
result = tm.round_trip_localpath(df.to_feather, pd.read_feather)

0 commit comments

Comments
 (0)