Skip to content

MAINT: add ability to specify recursionlimit #7849

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 1 commit into from
Jan 17, 2017
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
MAINT: add ability to specify recursionlimit
We're getting a test failure on OSX and Python 3.6 where parsing reaches the
recursion limit: #7799

Upping the recursionlimit resolves the error.

Add command line argument to tests to up the recursion limit for the
test run.
  • Loading branch information
matthew-brett committed Jan 16, 2017
commit 3434eb5076c250a6bdce9558454a24e53d76a66f
9 changes: 8 additions & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os
import sys
import time
import argparse

import matplotlib
matplotlib.use('agg')
Expand Down Expand Up @@ -50,5 +51,11 @@ def run(extra_args):
disable_internet.turn_off_internet()
extra_args.extend(['-a', '!network'])
sys.argv.remove('--no-network')

# Get recursion limit
parser = argparse.ArgumentParser()
parser.add_argument('--recursionlimit', type=int, default=0,
help='Specify recursionlimit for test run')
found_args, sys.argv = parser.parse_known_args(sys.argv)
if found_args.recursionlimit:
sys.setrecursionlimit(found_args.recursionlimit)
run(extra_args)