summaryrefslogtreecommitdiff
path: root/tests/extmod/vfs_fat_ramdisk.py
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2020-03-22 21:26:08 -0500
committerDamien George <damien.p.george@gmail.com>2020-03-30 13:21:58 +1100
commit3dc324d3f1312e40d3a8ed87e7244966bb756f26 (patch)
tree94ff44f8eabba0039582c245b901173597edd11e /tests/extmod/vfs_fat_ramdisk.py
parent488613bca6c460340ed2995ae5cafafe22d0bfff (diff)
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.
Diffstat (limited to 'tests/extmod/vfs_fat_ramdisk.py')
-rw-r--r--tests/extmod/vfs_fat_ramdisk.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py
index 11b2df7f4..5f758bf89 100644
--- a/tests/extmod/vfs_fat_ramdisk.py
+++ b/tests/extmod/vfs_fat_ramdisk.py
@@ -20,17 +20,17 @@ class RAMFS:
self.data = bytearray(blocks * self.SEC_SIZE)
def readblocks(self, n, buf):
- #print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
+ # print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf)))
for i in range(len(buf)):
buf[i] = self.data[n * self.SEC_SIZE + i]
def writeblocks(self, n, buf):
- #print("writeblocks(%s, %x)" % (n, id(buf)))
+ # print("writeblocks(%s, %x)" % (n, id(buf)))
for i in range(len(buf)):
self.data[n * self.SEC_SIZE + i] = buf[i]
def ioctl(self, op, arg):
- #print("ioctl(%d, %r)" % (op, arg))
+ # print("ioctl(%d, %r)" % (op, arg))
if op == 4: # MP_BLOCKDEV_IOCTL_BLOCK_COUNT
return len(self.data) // self.SEC_SIZE
if op == 5: # MP_BLOCKDEV_IOCTL_BLOCK_SIZE
@@ -64,7 +64,7 @@ with vfs.open("foo_file.txt", "w") as f:
print(list(vfs.ilistdir()))
print("stat root:", vfs.stat("/"))
-print("stat file:", vfs.stat("foo_file.txt")[:-3]) # timestamps differ across runs
+print("stat file:", vfs.stat("foo_file.txt")[:-3]) # timestamps differ across runs
print(b"FOO_FILETXT" in bdev.data)
print(b"hello!" in bdev.data)
@@ -94,4 +94,4 @@ print(list(vfs.ilistdir(b"")))
try:
vfs.ilistdir(b"no_exist")
except OSError as e:
- print('ENOENT:', e.args[0] == uerrno.ENOENT)
+ print("ENOENT:", e.args[0] == uerrno.ENOENT)