From 2da150b89088f845186f84d5408b46a1b1807876 Mon Sep 17 00:00:00 2001 From: Alistair Coles Date: Mon, 26 Feb 2024 11:12:47 +0000 Subject: [PATCH] Fix diskfile test failing on macOS The existing test fails on macOS because the value of errno.ENODATA is platform dependent. On macOS ENODATA is 96: % man 2 intro|grep ENODATA 96 ENODATA No message available. Change-Id: Ibc760e641d4351ed771f2321dba27dc4e5b367c1 --- test/unit/obj/test_diskfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/obj/test_diskfile.py b/test/unit/obj/test_diskfile.py index c7ed51bf44..d303ab55e3 100644 --- a/test/unit/obj/test_diskfile.py +++ b/test/unit/obj/test_diskfile.py @@ -4893,8 +4893,8 @@ class DiskFileMixin(BaseDiskFileTestMixin): with self.assertRaises(DiskFileQuarantined) as err: df.open() self.assertEqual( - 'Failed to open %s: [Errno 61] -ENODATA fool!' % df._data_file, - str(err.exception)) + 'Failed to open %s: [Errno %d] -ENODATA fool!' + % (df._data_file, errno.ENODATA), str(err.exception)) def test_quarantine_hashdir_not_a_directory(self): df, df_data = self._create_test_file(b'1234567890', account="abc",