Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion tests/test_circular.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ def test_max_recursion_depth(dumps):
dumps(root)

rl = sys.getrecursionlimit()
sys.setrecursionlimit(500)

if hasattr(sys, "pyston_version_info"):
Comment thread
lelit marked this conversation as resolved.
# In Pyston setrecursionlimit() sets a lower bound on the number of frames,
# not an exact count. So set the limit lower:
sys.setrecursionlimit(100)
else:
# Otherwise set it to the exact value:
sys.setrecursionlimit(500)

try:
with pytest.raises(expected_exception):
dumps(root)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_memory_leaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import io
import datetime
import gc
import tracemalloc

import pytest
import rapidjson as rj

tracemalloc = pytest.importorskip("tracemalloc")


def object_hook(td):
if '__td__' in td:
Expand Down