From 9333952c2300f97facb23734547cd5c90a096063 Mon Sep 17 00:00:00 2001 From: Michael Gasvoda Date: Mon, 21 Aug 2017 09:53:09 -0400 Subject: [PATCH] Checking output of tests --- pandas/tests/frame/test_analytics.py | 11 +++++++---- pandas/tests/series/test_analytics.py | 9 +++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pandas/tests/frame/test_analytics.py b/pandas/tests/frame/test_analytics.py index c202a07c9ef8a..93514a8a42215 100644 --- a/pandas/tests/frame/test_analytics.py +++ b/pandas/tests/frame/test_analytics.py @@ -1934,10 +1934,13 @@ def test_clip_against_frame(self, axis): def test_clip_with_na_args(self): """Should process np.nan argument as None """ # GH # 17276 - self.frame.clip(np.nan) - self.frame.clip(upper=[1, 2, np.nan]) - self.frame.clip(lower=[1, np.nan, 3]) - self.frame.clip(upper=np.nan, lower=np.nan) + tm.assert_frame_equal(self.frame.clip(np.nan), self.frame) + tm.assert_frame_equal(self.frame.clip(upper=[1, 2, np.nan]), + self.frame) + tm.assert_frame_equal(self.frame.clip(lower=[1, np.nan, 3]), + self.frame) + tm.assert_frame_equal(self.frame.clip(upper=np.nan, lower=np.nan), + self.frame) # Matrix-like diff --git a/pandas/tests/series/test_analytics.py b/pandas/tests/series/test_analytics.py index 13900536227e0..f1d044f7a1132 100644 --- a/pandas/tests/series/test_analytics.py +++ b/pandas/tests/series/test_analytics.py @@ -1005,10 +1005,11 @@ def test_clip_with_na_args(self): # GH # 17276 s = Series([1, 2, 3]) - s.clip(np.nan) - s.clip(upper=[1, 2, np.nan]) - s.clip(lower=[1, np.nan, 3]) - s.clip(upper=np.nan, lower=np.nan) + assert_series_equal(s.clip(np.nan), Series([1, 2, 3])) + assert_series_equal(s.clip(upper=[1, 1, np.nan]), Series([1, 2, 3])) + assert_series_equal(s.clip(lower=[1, np.nan, 1]), Series([1, 2, 3])) + assert_series_equal(s.clip(upper=np.nan, lower=np.nan), + Series([1, 2, 3])) def test_clip_against_series(self): # GH #6966