Skip to content

Commit 11bab16

Browse files
cmaloneyclaude
andcommitted
Use Path.read_bytes()
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ee9c3d1 commit 11bab16

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/test/test_importlib/test_util.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,7 @@ def test_atomic_write_retries_incomplete_writes(self):
811811
with os_helper.temp_cwd(None):
812812
with self.limit_writes([3, 3]):
813813
_bootstrap_external._write_atomic('file', b'abcdef')
814-
with open('file', 'rb') as file:
815-
self.assertEqual(file.read(), b'abcdef')
814+
self.assertEqual(pathlib.Path('file').read_bytes(), b'abcdef')
816815

817816
def test_atomic_write_errors_if_unable_to_complete(self):
818817
with os_helper.temp_cwd(None):

0 commit comments

Comments
 (0)