Commit Graph

7 Commits

Author SHA1 Message Date
stijn 40ad8f1666 all: Rename "sys" module to "usys".
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.

Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
2020-09-04 00:10:24 +10:00
David Lechner 3dc324d3f1 tests: Format all Python code with black, except tests in basics subdir.
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-30 13:21:58 +11:00
Paul Sokolovsky e02cb9ec31 tests/heapalloc_*: Refactor some tests to work in strict stackless mode.
In strict stackless mode, it's not possible to make a function call with
heap locked (because function activation record aka frame is allocated on
heap). So, if the only purpose of function is to introduce local variable
scope, move heap lock/unlock calls inside the function.
2017-12-11 12:00:41 +02:00
Paul Sokolovsky 85d809d1f4 tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
Paul Sokolovsky 1a71d30fb8 tests/micropython: Make uio-using tests skippable. 2017-03-09 10:26:31 +01:00
Damien George 7081ea4119 tests/micropython: Get heapalloc_traceback test running on baremetal.
When printing exceptions from files sent to a target by pyboard.py the
filename in the exception is <stdin>, which differs to when running the
script on the PC.  So we strip out the filename to make the outputs the
same on all targets (see also misc/print_exception.py test).
2016-12-15 11:11:57 +11:00
Damien George 1f43d49f9e tests/micropython: Move alloc-less traceback test to separate test file.
The native emitter doesn't provide proper traceback info so this test
should not be run in that case.
2016-11-21 17:39:23 +11:00