Skip to content

TST: Avoid stack overflow on Windows CI with recursion test #46345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pandas/tests/dtypes/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import itertools
from numbers import Number
import re
import sys

import numpy as np
import pytest
Expand Down Expand Up @@ -205,8 +206,14 @@ def foo():
inference.is_list_like([])
foo()

with tm.external_error_raised(RecursionError):
foo()
rec_limit = sys.getrecursionlimit()
try:
# Limit to avoid stack overflow on Windows CI
sys.setrecursionlimit(100)
with tm.external_error_raised(RecursionError):
foo()
finally:
sys.setrecursionlimit(rec_limit)


def test_is_list_like_iter_is_none():
Expand Down