Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3434eb5

Browse filesBrowse files
committed
MAINT: add ability to specify recursionlimit
We're getting a test failure on OSX and Python 3.6 where parsing reaches the recursion limit: matplotlib#7799 Upping the recursionlimit resolves the error. Add command line argument to tests to up the recursion limit for the test run.
1 parent 17bf680 commit 3434eb5
Copy full SHA for 3434eb5

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎tests.py

Copy file name to clipboardExpand all lines: tests.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import os
1313
import sys
1414
import time
15+
import argparse
1516

1617
import matplotlib
1718
matplotlib.use('agg')
@@ -50,5 +51,11 @@ def run(extra_args):
5051
disable_internet.turn_off_internet()
5152
extra_args.extend(['-a', '!network'])
5253
sys.argv.remove('--no-network')
53-
54+
# Get recursion limit
55+
parser = argparse.ArgumentParser()
56+
parser.add_argument('--recursionlimit', type=int, default=0,
57+
help='Specify recursionlimit for test run')
58+
found_args, sys.argv = parser.parse_known_args(sys.argv)
59+
if found_args.recursionlimit:
60+
sys.setrecursionlimit(found_args.recursionlimit)
5461
run(extra_args)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.