Scott Shawcroft
f0bb26d70f
Merge MicroPython 1.13 into CircuitPython
2021-05-04 18:06:33 -07:00
Scott Shawcroft
b35fa44c8a
Merge MicroPython 1.12 into CircuitPython
2021-05-03 14:01:18 -07:00
microDev
a52eb88031
run code formatting script
2021-03-15 19:27:36 +05:30
Damien George
0e6ef40359
tests/extmod: Add tests for verifying FAT and littlefs mtime values.
...
Verifies mtime timestamps on files match the value returned by time.time().
Also update vfs_fat_ramdisk.py so it doesn't check FAT timestamp of the
root, because that may change across runs/ports.
Signed-off-by: Damien George <damien@micropython.org>
2020-09-02 00:19:38 +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
Dan Halbert
7c219600a2
WIP: after merge; before testing
2018-07-11 16:45:30 -04:00
Dan Halbert
fa814a32ce
Make Trinket M0 build fit; make RAMFS in vfs_fat_* tests be compliant with expected API
2018-06-14 21:02:12 -04: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
Jeff Epler
fe7f405fc7
Add VfsFat.label property
...
These allow accessing the filesystem label. For instance,
in boot.py, you can set the label on the built-in storage with:
storage.remount('/', False)
storage.getmount('/').label = "NEWLABEL"
storage.remount('/', True)
Users with multiple CIRCUITPY boards may find it desirable to
choose a different label for each board they own.
2018-03-27 21:28:18 -05:00
Paul Sokolovsky
85d809d1f4
tests: Convert remaining "sys.exit()" to "raise SystemExit".
2017-06-10 20:34:38 +03:00
Damien George
cda09727b4
tests/extmod/vfs_fat: Add test for ilistdir of a non-existent directory.
2017-05-13 19:10:15 +10:00
Damien George
852c215d76
tests/extmod/vfs: Update tests to reflect new ilistdir() method.
2017-05-10 11:39:29 +10:00
Paul Sokolovsky
f2d732f459
tests/extmod: Make tests skippable.
2017-02-15 01:56:22 +03:00
Damien George
a0c729681f
tests/extmod/vfs_fat_ramdisk: Make it work on pyboard.
2017-01-27 23:22:15 +11:00
Damien George
b9bfaa349a
tests/extmod/vfs_fat: Update tests to work with new VFS sub-system.
...
The vfs_fat_fsusermount test is no longer relevant so has been removed.
2017-01-27 17:21:45 +11:00
Damien George
94d87fbb30
test/extmod: Update vfs_fat tests for new OO FatFs library.
...
The new version of FatFs requires a minimum of 50 blocks on the device.
Also, some tests no longer make sense with an OO vfs.
2017-01-27 13:19:10 +11:00
Alex March
cb20d999bc
tests/extmod/vfs_fat: Improve VFS test coverage.
...
Covered case:
- Stat cases
- Invalid read/write/flush/close
- Invalid mkdir/rmdir/remove/getcwd
- File seek/tell, modes a/x/+, t/b
- Writing to a full disk
- Full path rename, slash trim
- Rename cases
- Bytestring listdir
- File object printing
2016-10-24 12:49:19 +11:00
Alex March
e42186d356
tests/extmod/vfs_fat: Replace asserts with prints and expected outputs.
2016-10-13 14:56:47 +03:00
Alex March
f274561e16
tests/extmod/vfs_fat: Test coverage for remove() and rmdir().
2016-10-11 16:03:52 +11:00
Alex March
670376c5cb
tests/extmod/vfs_fat_ramdisk: Add test for VFS.statvfs().
2016-09-27 13:48:58 +10:00
Radomir Dopieralski
fea7fe45ea
tests/extmod/vfs_fat_ramdisk: Add tests for VFS.umount()
...
Try to un-mount a file system and re-mount it again.
2016-08-26 23:24:32 +03:00
Paul Sokolovsky
f0eea1fdf9
tests/extmod/vfs_fat_ramdisk: Add testcases for chdir(), getcwd().
2016-05-29 18:54:14 +03:00
Paul Sokolovsky
2740dd85f2
tests/vfs_fat_ramdisk: Add testcase for .rename().
2016-02-29 01:24:18 +02:00
Paul Sokolovsky
9fb36af9af
tests/vfs_fat_ramdisk: Allow to run in native mode (don't use "with").
2016-02-29 01:03:32 +02:00
Paul Sokolovsky
eaa96a7610
tests/vfs_fat_ramdisk: Add testcase for .mkdir().
2016-02-29 00:06:44 +02:00
Paul Sokolovsky
57425b648f
tests/vfs_fat_ramdisk: Add testcase for .remove().
2016-02-28 20:30:59 +02:00
Paul Sokolovsky
9c081b740b
tests/vfs_fat_ramdisk: Add .listdir() testcase.
2016-02-28 17:19:12 +02:00
Paul Sokolovsky
dfc35afba1
tests/vfs_fat_ramdisk: Skip test if can't allocate ramdisk.
2016-02-15 17:27:57 +02:00
Paul Sokolovsky
9fdac9144d
tests/vfs_fat_ramdisk: Allow to override sector size.
2016-02-14 20:52:38 +02:00
Paul Sokolovsky
9d0525182d
tests/vfs_fat_ramdisk: Switch to ioctl-based blockdev API.
2016-02-14 20:45:08 +02:00
Paul Sokolovsky
0ee1d0f407
tests/vfs_fat_ramdisk: Add test for VfsFat.
2016-02-14 19:15:22 +02:00