Per POSIX, this is EINVAL, so raises OSError(EINVAL).crypto-aes
parent
0cd9ab7755
commit
e3383e9352
@ -0,0 +1,13 @@
|
||||
try:
|
||||
import uio as io
|
||||
except ImportError:
|
||||
import io
|
||||
|
||||
a = io.BytesIO(b"foobar")
|
||||
try:
|
||||
a.seek(-10)
|
||||
except Exception as e:
|
||||
# CPython throws ValueError, but MicroPython has consistent stream
|
||||
# interface, so BytesIO raises the same error as a real file, which
|
||||
# is OSError(EINVAL).
|
||||
print(repr(e))
|
@ -0,0 +1 @@
|
||||
OSError(22,)
|
Loading…
Reference in new issue