mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052)
This commit is contained in:
parent
da310d209a
commit
f7cc7d296c
18 changed files with 51 additions and 54 deletions
|
@ -20,7 +20,7 @@ class PathTests:
|
|||
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))
|
||||
self.assertEndsWith(path.name, "utf-8.file")
|
||||
self.assertEqual('Hello, UTF-8 world!\n', path.read_text(encoding='utf-8'))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue