diff options
author | Barry Warsaw <barry@python.org> | 2018-01-15 23:07:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 23:07:11 (GMT) |
commit | 5ec0feeeecc1617987ec6cdc6d62b916e718a5cf (patch) | |
tree | 158c8a278acd9a7d2de71553c22199aa9b5b6ec6 /Lib/test/test_importlib | |
parent | 21102f0dc20cc347677191817c1b66e20ef7bf21 (diff) | |
download | cpython-5ec0feeeecc1617987ec6cdc6d62b916e718a5cf.zip cpython-5ec0feeeecc1617987ec6cdc6d62b916e718a5cf.tar.gz cpython-5ec0feeeecc1617987ec6cdc6d62b916e718a5cf.tar.bz2 |
Implement the get_resource_reader() API for file system imports (#5168)
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r-- | Lib/test/test_importlib/test_resource.py | 2 | ||||
-rw-r--r-- | Lib/test/test_importlib/util.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/test_resource.py b/Lib/test/test_importlib/test_resource.py index c35f789..c38ad03 100644 --- a/Lib/test/test_importlib/test_resource.py +++ b/Lib/test/test_importlib/test_resource.py @@ -1,10 +1,10 @@ import sys import unittest -from importlib import resources from . import data01 from . import zipdata02 from . import util +from importlib import resources class ResourceTests: diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py index bfb7cad..7b07b04 100644 --- a/Lib/test/test_importlib/util.py +++ b/Lib/test/test_importlib/util.py @@ -397,6 +397,9 @@ class CASEOKTestBase: def create_package(file, path, is_package=True, contents=()): class Reader(ResourceReader): + def get_resource_reader(self, package): + return self + def open_resource(self, path): self._path = path if isinstance(file, Exception): |