mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Bump importlib-resources from 6.0.1 to 6.4.0 (#2285)
* Bump importlib-resources from 6.0.1 to 6.4.0 Bumps [importlib-resources](https://github.com/python/importlib_resources) from 6.0.1 to 6.4.0. - [Release notes](https://github.com/python/importlib_resources/releases) - [Changelog](https://github.com/python/importlib_resources/blob/main/NEWS.rst) - [Commits](https://github.com/python/importlib_resources/compare/v6.0.1...v6.4.0) --- updated-dependencies: - dependency-name: importlib-resources dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update importlib-resources==6.4.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
6c6fa34ba4
commit
b01b21ae05
34 changed files with 725 additions and 349 deletions
|
@ -1,4 +1,5 @@
|
|||
import io
|
||||
import pathlib
|
||||
import unittest
|
||||
|
||||
import importlib_resources as resources
|
||||
|
@ -15,18 +16,13 @@ class CommonTests(util.CommonTests, unittest.TestCase):
|
|||
class PathTests:
|
||||
def test_reading(self):
|
||||
"""
|
||||
Path should be readable.
|
||||
|
||||
Test also implicitly verifies the returned object is a pathlib.Path
|
||||
instance.
|
||||
Path should be readable and a pathlib.Path instance.
|
||||
"""
|
||||
target = resources.files(self.data) / 'utf-8.file'
|
||||
with resources.as_file(target) as path:
|
||||
self.assertIsInstance(path, pathlib.Path)
|
||||
self.assertTrue(path.name.endswith("utf-8.file"), repr(path))
|
||||
# pathlib.Path.read_text() was introduced in Python 3.5.
|
||||
with path.open('r', encoding='utf-8') as file:
|
||||
text = file.read()
|
||||
self.assertEqual('Hello, UTF-8 world!\n', text)
|
||||
self.assertEqual('Hello, UTF-8 world!\n', path.read_text(encoding='utf-8'))
|
||||
|
||||
|
||||
class PathDiskTests(PathTests, unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue