mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-10 13:40:16 +00:00
add test for seek(0)
This commit is contained in:
parent
46f519bdb8
commit
c38a94da53
@ -38,4 +38,13 @@ f()
|
|||||||
|
|
||||||
assert os.path.exists('123.bin')
|
assert os.path.exists('123.bin')
|
||||||
os.remove('123.bin')
|
os.remove('123.bin')
|
||||||
assert not os.path.exists('123.bin')
|
assert not os.path.exists('123.bin')
|
||||||
|
|
||||||
|
f = open("123.txt","w+")
|
||||||
|
f.write("123456")
|
||||||
|
f.seek(0)
|
||||||
|
assert ( f.read() == "123456" )
|
||||||
|
# cannot test seek(>0) then read() for now
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
os.remove('123.txt')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user