2015-03-21 17:09:25 +01:00
|
|
|
from classes.file import File
|
|
|
|
from os.path import exists
|
|
|
|
|
|
|
|
f = File('text.txt')
|
2015-03-21 17:44:43 +01:00
|
|
|
assert f.write_bytes(b'testing bytes i/o'), 17
|
2015-03-21 17:09:25 +01:00
|
|
|
assert f.read_bytes(), b'testing bytes i/o'
|
|
|
|
f.open() # does it open any text editor on your system?
|
|
|
|
f.remove()
|
|
|
|
assert exists('text.txt'), False
|