Skip to content

Commit

Permalink
TST: better suppress deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
changhiskhan committed Nov 24, 2012
1 parent ed5a4e8 commit 5645be2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pandas/sparse/tests/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import pandas.tests.test_frame as test_frame
import pandas.tests.test_panel as test_panel
import pandas.tests.test_series as test_series
from pandas.util.py3compat import StringIO

from test_array import assert_sp_array_equal

Expand Down Expand Up @@ -819,7 +820,11 @@ def test_sparse_to_dense(self):
pass

def test_sparse_series_ops(self):
import sys
buf = StringIO()
sys.stderr = buf
self._check_all(self._check_frame_ops)
sys.stderr = sys.__stderr__

This comment has been minimized.

Copy link
@changhiskhan

changhiskhan Nov 24, 2012

Author Contributor

Good catch!
I pushed a fixed to master. Thanks!


def _check_frame_ops(self, frame):
fill = frame.default_fill_value
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3479,8 +3479,6 @@ def test_combineSeries(self):
smaller_added2 = self.tsframe + smaller_ts
assert_frame_equal(smaller_added, smaller_added2)

sys.stderr = sys.__stderr__

# length 0
result = self.tsframe + ts[:0]

Expand All @@ -3493,6 +3491,8 @@ def test_combineSeries(self):
result = frame * ts
self.assertEqual(len(result), len(ts))

sys.stderr = sys.__stderr__

def test_combineFunc(self):
result = self.frame * 2
self.assert_(np.array_equal(result.values, self.frame.values * 2))
Expand Down

0 comments on commit 5645be2

Please sign in to comment.