summaryrefslogtreecommitdiff
path: root/tests/micropython/heap_lock.py
AgeCommit message (Collapse)Author
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2020-03-11py/modmicropython: Add heap_locked function to test state of heap.Andrew Leech
This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
2018-03-02tests: Move heap-realloc-while-locked test from C to Python.Damien George
This test for calling gc_realloc() while the GC is locked can be done in pure Python, so better to do it that way since it can then be tested on more ports.
2016-10-14tests/micropython: Add tests for heap_lock, and emergency exceptions.Damien George