diff options
| author | robot-piglet <[email protected]> | 2025-10-27 12:03:36 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-10-27 12:27:00 +0300 |
| commit | 7d26bae5f88e44b93c6bb0879cb25277b8b26293 (patch) | |
| tree | 534e97c222ecbbcb92ac7d09abfc7c6439fa43cb /contrib/python/s3transfer/py3/tests/unit/test_utils.py | |
| parent | 77fde68b98753b104a2cfea662eb154783404487 (diff) | |
Intermediate changes
commit_hash:84961fae4145adf925b556f48aecc5bce296cafb
Diffstat (limited to 'contrib/python/s3transfer/py3/tests/unit/test_utils.py')
| -rw-r--r-- | contrib/python/s3transfer/py3/tests/unit/test_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/python/s3transfer/py3/tests/unit/test_utils.py b/contrib/python/s3transfer/py3/tests/unit/test_utils.py index 5cfc639ff55..444bad0baa7 100644 --- a/contrib/python/s3transfer/py3/tests/unit/test_utils.py +++ b/contrib/python/s3transfer/py3/tests/unit/test_utils.py @@ -282,7 +282,7 @@ class TestOSUtils(BaseUtilsTest): try: OSUtils().remove_file(non_existent_file) except OSError as e: - self.fail('OSError should have been caught: %s' % e) + self.fail(f'OSError should have been caught: {e}') def test_remove_file_proxies_remove_file(self): OSUtils().remove_file(self.filename) @@ -306,7 +306,7 @@ class TestOSUtils(BaseUtilsTest): filename = 'myfile' self.assertIsNotNone( re.match( - r'%s\.[0-9A-Fa-f]{8}$' % filename, + rf'{filename}\.[0-9A-Fa-f]{{8}}$', OSUtils().get_temp_filename(filename), ) ) @@ -329,7 +329,7 @@ class TestOSUtils(BaseUtilsTest): @mock.patch('s3transfer.utils.fallocate') def test_allocate_with_io_error(self, mock_fallocate): - mock_fallocate.side_effect = IOError() + mock_fallocate.side_effect = OSError() with self.assertRaises(IOError): OSUtils().allocate(self.filename, 1) self.assertFalse(os.path.exists(self.filename)) |
