@@ -41,8 +41,8 @@ def ioctl(self, op, arg):
4141
4242uos .VfsFat .mkfs (bdev )
4343
44- assert b"FOO_FILETXT" not in bdev .data
45- assert b"hello!" not in bdev .data
44+ print ( b"FOO_FILETXT" not in bdev .data )
45+ print ( b"hello!" not in bdev .data )
4646
4747vfs = uos .VfsFat (bdev , "/ramdisk" )
4848print ("statvfs:" , vfs .statvfs ("/ramdisk" ))
@@ -57,21 +57,21 @@ def ioctl(self, op, arg):
5757print (f2 .read ())
5858f2 .close ()
5959
60- assert b"FOO_FILETXT" in bdev .data
61- assert b"hello!" in bdev .data
60+ print ( b"FOO_FILETXT" in bdev .data )
61+ print ( b"hello!" in bdev .data )
6262
63- assert vfs .listdir () == [ 'foo_file.txt' ]
63+ print ( vfs .listdir ())
6464
6565try :
6666 vfs .rmdir ("foo_file.txt" )
6767except OSError as e :
6868 print (e .args [0 ] == 20 ) # uerrno.ENOTDIR
6969
7070vfs .remove ('foo_file.txt' )
71- assert vfs .listdir () == []
71+ print ( vfs .listdir ())
7272
7373vfs .mkdir ("foo_dir" )
74- assert vfs .listdir () == [ 'foo_dir' ]
74+ print ( vfs .listdir ())
7575
7676try :
7777 vfs .remove ("foo_dir" )
@@ -82,18 +82,18 @@ def ioctl(self, op, arg):
8282f .write ("data in file" )
8383f .close ()
8484
85- assert vfs .listdir ("foo_dir" ) == [ 'file-in-dir.txt' ]
85+ print ( vfs .listdir ("foo_dir" ))
8686
8787vfs .rename ("foo_dir/file-in-dir.txt" , "moved-to-root.txt" )
88- assert vfs .listdir () == [ 'foo_dir' , 'moved-to-root.txt' ]
88+ print ( vfs .listdir ())
8989
9090vfs .chdir ("foo_dir" )
9191print ("getcwd:" , vfs .getcwd ())
92- assert vfs .listdir () == []
92+ print ( vfs .listdir ())
9393
9494with vfs .open ("sub_file.txt" , "w" ) as f :
9595 f .write ("test2" )
96- assert vfs .listdir () == [ "sub_file.txt" ]
96+ print ( vfs .listdir ())
9797
9898try :
9999 vfs .chdir ("sub_file.txt" )
@@ -116,9 +116,7 @@ def ioctl(self, op, arg):
116116try :
117117 vfs .listdir ()
118118except OSError as e :
119- assert e .args [0 ] == uerrno .ENODEV
120- else :
121- raise AssertionError ("expected OSError not thrown" )
119+ print (e .args [0 ] == uerrno .ENODEV )
122120
123121vfs = uos .VfsFat (bdev , "/ramdisk" )
124- assert vfs .listdir () == [ 'moved-to-root.txt' ]
122+ print ( vfs .listdir ())
0 commit comments