Skip to content

Commit

Permalink
Checking output of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgasvoda committed Aug 21, 2017
1 parent 4e0464e commit 9333952
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions pandas/tests/frame/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions pandas/tests/series/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9333952

Please sign in to comment.