You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests/io/resource_stream: Add test for uio.resource_stream().
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import uio
|
||||
import sys
|
||||
|
||||
try:
|
||||
uio.resource_stream
|
||||
except AttributeError:
|
||||
print('SKIP')
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
buf = uio.resource_stream("data", "file2")
|
||||
except NotImplementedError:
|
||||
pass
|
||||
|
||||
# resource_stream(None, ...) look ups from current dir, hence sys.path[0] hack
|
||||
buf = uio.resource_stream(None, sys.path[0] + "/data/file2")
|
||||
print(buf.read())
|
||||
@@ -0,0 +1 @@
|
||||
1234
|
||||
Reference in New Issue
Block a user