From 512f4a6ad1c495760b50eca1bdee60314814b077 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 3 Mar 2018 23:58:03 +1100 Subject: [PATCH] tests/unix: Add coverage test for uio.resource_stream from frozen str. --- tests/unix/extra_coverage.py | 5 +++++ tests/unix/extra_coverage.py.exp | 1 + 2 files changed, 6 insertions(+) diff --git a/tests/unix/extra_coverage.py b/tests/unix/extra_coverage.py index 7a496aa879..65011198dd 100644 --- a/tests/unix/extra_coverage.py +++ b/tests/unix/extra_coverage.py @@ -71,3 +71,8 @@ try: import frzmpy2 except ZeroDivisionError: print('ZeroDivisionError') + +# test loading a resource from a frozen string +import uio +buf = uio.resource_stream('frzstr_pkg2', 'mod.py') +print(buf.read(21)) diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index d2e557fdcb..009874509d 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -104,3 +104,4 @@ frzstr_pkg2.mod frzmpy_pkg2.mod 1 ZeroDivisionError +b'# test frozen package'