summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_userfs.py
Commit message (Collapse)AuthorAge
* tests: Use vfs module instead of os.Damien George2024-02-07
| | | | Signed-off-by: Damien George <damien@micropython.org>
* extmod/vfs_reader: Add file ioctl to set read buffer size.Andrew Leech2023-11-09
| | | | | | Can be used to speed up importing a file from a vfs based filesystem. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
* py/persistentcode: Always close reader even if an exception is raised.Damien George2023-09-14
| | | | | | Fixes issue #3874. Signed-off-by: Damien George <damien@micropython.org>
* py/parse: Always free lexer even if an exception is raised.Damien George2023-09-14
| | | | | | Fixes issue #3843. Signed-off-by: Damien George <damien@micropython.org>
* tests: Replace umodule with module everywhere.Jim Mussared2023-06-08
| | | | | | This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* all: Rename "sys" module to "usys".stijn2020-09-04
| | | | | | | | | 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".
* extmod/vfs_reader: Fix mp_reader_new_file to open file in "rb" mode.Damien George2020-08-12
| | | | | | | | | | | | | | | | | | mp_reader_new_file() is used to read in files for importing, either .py or .mpy files, for the lexer and persistent code loader respectively. In both cases the file should be opened in raw bytes mode: the lexer handles unicode characters itself, and .mpy files contain 8-bit bytes by nature. Before this commit importing was working correctly because, although the file was opened in text mode, all native filesystem implementations (POSIX, FAT, LFS) would access the file in raw bytes mode via mp_stream_rw() calling mp_stream_p_t.read(). So it was only an issue for non-native filesystems, such as those implemented in Python. For Python-based filesystem implementations, a call to mp_stream_rw() would go via IOBase and then to readinto() at the Python level, and readinto() is only defined on files opened in raw bytes mode. Signed-off-by: Damien George <damien@micropython.org>
* tests: Format all Python code with black, except tests in basics subdir.David Lechner2020-03-30
| | | | | | | | | | 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.
* tests: Improve feature detection for VFS.Ayke van Laethem2018-07-20
|
* tests/extmod: Add test for VFS and user-defined filesystem and files.Damien George2018-06-12