summaryrefslogtreecommitdiffstatshomepage
path: root/tests/io/resource_stream.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/io/resource_stream.py')
-rw-r--r--tests/io/resource_stream.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/io/resource_stream.py b/tests/io/resource_stream.py
new file mode 100644
index 0000000000..86975f1181
--- /dev/null
+++ b/tests/io/resource_stream.py
@@ -0,0 +1,15 @@
+import uio
+import sys
+
+try:
+ uio.resource_stream
+except AttributeError:
+ print('SKIP')
+ sys.exit()
+
+buf = uio.resource_stream("data", "file2")
+print(buf.read())
+
+# 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())