diff options
author | Damien George <damien.p.george@gmail.com> | 2018-02-27 22:39:17 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-02-27 22:39:17 +1100 |
commit | 439acddc6052f112e8c2e57a6d50c7569344a6bf (patch) | |
tree | 5b07575225b5397c4a0b4addd145ef4d81e078aa /tests/basics/gc1.py | |
parent | d3cac18d4914af4549437ef3fd0d62f1fc05ff27 (diff) | |
download | micropython-439acddc6052f112e8c2e57a6d50c7569344a6bf.tar.gz micropython-439acddc6052f112e8c2e57a6d50c7569344a6bf.zip |
tests/basics/gc1: Add test which triggers GC threshold.
Diffstat (limited to 'tests/basics/gc1.py')
-rw-r--r-- | tests/basics/gc1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/basics/gc1.py b/tests/basics/gc1.py index dcbe0bfcf6..332bf9744c 100644 --- a/tests/basics/gc1.py +++ b/tests/basics/gc1.py @@ -27,3 +27,8 @@ if hasattr(gc, 'threshold'): assert(gc.threshold() == 0) assert(gc.threshold(-1) is None) assert(gc.threshold() == -1) + + # Setting a low threshold should trigger collection at the list alloc + gc.threshold(1) + [[], []] + gc.threshold(-1) |