Skip to content

Commit

Permalink
change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yl2526 committed Jun 2, 2017
1 parent 0d48164 commit 8568044
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions pandas/tests/frame/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@ def test_clip_against_series(self, inplace):
@pytest.mark.parametrize("inplace", [True, False])
def test_clip_against_list(self, inplace):
# GH #15390
original = self.simple
original = self.simple.copy(deep=True)

result = original.clip(lower=[2, 3, 4], upper=[5, 6, 7],
axis=1, inplace=inplace)
Expand All @@ -1907,9 +1907,8 @@ def test_clip_against_list(self, inplace):
columns=original.columns,
index=original.index)
if inplace:
tm.assert_frame_equal(original, expected, check_exact=True)
else:
tm.assert_frame_equal(result, expected, check_exact=True)
result = original
tm.assert_frame_equal(result, expected, check_exact=True)

def test_clip_against_frame(self):
df = DataFrame(np.random.randn(1000, 2))
Expand Down
5 changes: 2 additions & 3 deletions pandas/tests/series/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,9 +1023,8 @@ def test_clip_against_list(self, inplace):
expected = pd.Series([1, 2, 3])

if inplace:
tm.assert_series_equal(original, expected, check_exact=True)
else:
tm.assert_series_equal(result, expected, check_exact=True)
result = original
tm.assert_series_equal(result, expected, check_exact=True)

def test_clip_with_datetimes(self):

Expand Down

0 comments on commit 8568044

Please sign in to comment.