Commit Graph

11 Commits

Author SHA1 Message Date
Damien George 3123f6918b tests: Use .errno instead of .args[0] for OSError exceptions.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 22:03:46 +10:00
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
Damien George cfe1c5abf8 extmod/vfs: Rename BP_IOCTL_xxx constants to MP_BLOCKDEV_IOCTL_xxx.
Also rename SEC_COUNT to BLOCK_COUNT and SEC_SIZE to BLOCK_SIZE.
2019-10-29 14:17:29 +11:00
Ayke van Laethem 7c98c6b053
tests: Improve feature detection for VFS. 2018-07-20 00:50:57 +02:00
Damien George 5ef0d2ab14 tests/extmod: Remove conditional import of uos_vfs, it no longer exists.
This conditional import was only used to get the tests working on the unix
coverage build, which has now switched to use VFS by default so the uos
module alone has the required functionality.
2018-06-06 14:28:23 +10:00
Damien George 6c02da2eec tests/extmod: Add test for importing a script from a user VFS. 2018-06-06 14:28:23 +10:00
Paul Sokolovsky 85d809d1f4 tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
Paul Sokolovsky 054a381d7c tests/extmod/vfs_fat_more: Make skippable is uos is not available.
Fixes Zephyr tests.
2017-05-13 14:13:53 +03:00
Damien George 9bd67d9fbc tests/extmod: Make some vfs tests fully unmount FSs before running.
Otherwise the existing FSs can interfere with the tests, and in some
cases the tests can write to the real FS on the device.
2017-05-09 15:50:40 +10:00
Damien George 6c8b57a902 tests/extmod: Add more tests for VFS FAT. 2017-05-05 20:15:10 +10:00