Skip to content

Commit 2075539

Browse files
cchwalaWillAyd
authored andcommitted
Added small corrections to the test for interpolate limit_area (#30987)
1 parent 307137c commit 2075539

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/series/test_missing.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,7 @@ def test_interp_limit_area(self):
13471347
[np.nan, np.nan, 3.0, 4.0, np.nan, np.nan, 7.0, np.nan, np.nan]
13481348
)
13491349
result = s.interpolate(method="linear", limit_area="inside", limit=1)
1350+
tm.assert_series_equal(result, expected)
13501351

13511352
expected = Series([np.nan, np.nan, 3.0, 4.0, np.nan, 6.0, 7.0, np.nan, np.nan])
13521353
result = s.interpolate(
@@ -1362,6 +1363,7 @@ def test_interp_limit_area(self):
13621363
[np.nan, np.nan, 3.0, np.nan, np.nan, np.nan, 7.0, 7.0, np.nan]
13631364
)
13641365
result = s.interpolate(method="linear", limit_area="outside", limit=1)
1366+
tm.assert_series_equal(result, expected)
13651367

13661368
expected = Series([np.nan, 3.0, 3.0, np.nan, np.nan, np.nan, 7.0, 7.0, np.nan])
13671369
result = s.interpolate(
@@ -1371,8 +1373,9 @@ def test_interp_limit_area(self):
13711373

13721374
expected = Series([3.0, 3.0, 3.0, np.nan, np.nan, np.nan, 7.0, np.nan, np.nan])
13731375
result = s.interpolate(
1374-
method="linear", limit_area="outside", direction="backward"
1376+
method="linear", limit_area="outside", limit_direction="backward"
13751377
)
1378+
tm.assert_series_equal(result, expected)
13761379

13771380
# raises an error even if limit type is wrong.
13781381
msg = r"Invalid limit_area: expecting one of \['inside', 'outside'\], got abc"

0 commit comments

Comments
 (0)