Skip to content

Commit 439acdd

Browse files
committed
tests/basics/gc1: Add test which triggers GC threshold.
1 parent d3cac18 commit 439acdd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/basics/gc1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@
2727
assert(gc.threshold() == 0)
2828
assert(gc.threshold(-1) is None)
2929
assert(gc.threshold() == -1)
30+
31+
# Setting a low threshold should trigger collection at the list alloc
32+
gc.threshold(1)
33+
[[], []]
34+
gc.threshold(-1)

0 commit comments

Comments
 (0)