Skip to content

Commit ed85e9a

Browse files
authored
Update test_series.py
Add a test for issue # 1101
1 parent 926450b commit ed85e9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_series.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,6 +3541,13 @@ def test_series_dict() -> None:
35413541
)
35423542

35433543

3544+
def test_series_keys_type() -> None:
3545+
# GH 1101
3546+
if TYPE_CHECKING:
3547+
s = pd.Series([1, 2, 3])
3548+
assert_type(s.keys(), pd.Index)
3549+
3550+
35443551
def test_series_int_float() -> None:
35453552
# pyright infers mixtures of int and float in a list as list[int | float]
35463553
check(assert_type(pd.Series([1, 2, 3]), "pd.Series[int]"), pd.Series, np.integer)

0 commit comments

Comments
 (0)