@@ -41,8 +41,8 @@ def ioctl(self, op, arg):
41
41
42
42
uos .VfsFat .mkfs (bdev )
43
43
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 )
46
46
47
47
vfs = uos .VfsFat (bdev , "/ramdisk" )
48
48
print ("statvfs:" , vfs .statvfs ("/ramdisk" ))
@@ -57,21 +57,21 @@ def ioctl(self, op, arg):
57
57
print (f2 .read ())
58
58
f2 .close ()
59
59
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 )
62
62
63
- assert vfs .listdir () == [ 'foo_file.txt' ]
63
+ print ( vfs .listdir ())
64
64
65
65
try :
66
66
vfs .rmdir ("foo_file.txt" )
67
67
except OSError as e :
68
68
print (e .args [0 ] == 20 ) # uerrno.ENOTDIR
69
69
70
70
vfs .remove ('foo_file.txt' )
71
- assert vfs .listdir () == []
71
+ print ( vfs .listdir ())
72
72
73
73
vfs .mkdir ("foo_dir" )
74
- assert vfs .listdir () == [ 'foo_dir' ]
74
+ print ( vfs .listdir ())
75
75
76
76
try :
77
77
vfs .remove ("foo_dir" )
@@ -82,18 +82,18 @@ def ioctl(self, op, arg):
82
82
f .write ("data in file" )
83
83
f .close ()
84
84
85
- assert vfs .listdir ("foo_dir" ) == [ 'file-in-dir.txt' ]
85
+ print ( vfs .listdir ("foo_dir" ))
86
86
87
87
vfs .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 ())
89
89
90
90
vfs .chdir ("foo_dir" )
91
91
print ("getcwd:" , vfs .getcwd ())
92
- assert vfs .listdir () == []
92
+ print ( vfs .listdir ())
93
93
94
94
with vfs .open ("sub_file.txt" , "w" ) as f :
95
95
f .write ("test2" )
96
- assert vfs .listdir () == [ "sub_file.txt" ]
96
+ print ( vfs .listdir ())
97
97
98
98
try :
99
99
vfs .chdir ("sub_file.txt" )
@@ -116,9 +116,7 @@ def ioctl(self, op, arg):
116
116
try :
117
117
vfs .listdir ()
118
118
except 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 )
122
120
123
121
vfs = uos .VfsFat (bdev , "/ramdisk" )
124
- assert vfs .listdir () == [ 'moved-to-root.txt' ]
122
+ print ( vfs .listdir ())
0 commit comments