add test for seek(0)

This commit is contained in:
pmp-p 2023-12-22 11:43:38 +01:00
parent 46f519bdb8
commit c38a94da53

View File

@ -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')