)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"da99d91ec4f610f8c3a341c3355582f0944461cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2b7b9f2b_84521675","updated":"2025-09-15 19:13:37.000000000","message":"master:\n\n```\nvagrant@saio:~$ pytest swift/test/unit/obj/test_diskfile.py::TestDiskFile::test_create_close_oserror swift/test/unit/common/test_utils.py::TestFallocate::test_fallocate\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nplatform linux -- Python 3.10.12, pytest-8.4.1, pluggy-1.6.0 -- /usr/bin/python3\ncachedir: .pytest_cache\nrootdir: /home/vagrant/swift\nconfigfile: tox.ini\nplugins: subtests-0.14.2, cov-6.2.1\ncollected 2 items                                                                                                                                                                                                                                      \n\nswift/test/unit/obj/test_diskfile.py::TestDiskFile::test_create_close_oserror PASSED                                                                                                                                                             [ 50%]\nswift/test/unit/common/test_utils.py::TestFallocate::test_fallocate FAILED                                                                                                                                                                       [100%]\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d FAILURES \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n_____________________________________________________________________________________________________________ TestFallocate.test_fallocate _____________________________________________________________________________________________________________\n\nself \u003d \u003ctest.unit.common.test_utils.TestFallocate testMethod\u003dtest_fallocate\u003e, sys_fallocate_mock \u003d \u003cMagicMock name\u003d\u0027_sys_fallocate\u0027 id\u003d\u0027140321705329232\u0027\u003e, sys_posix_fallocate_mock \u003d \u003cMagicMock name\u003d\u0027_sys_posix_fallocate\u0027 id\u003d\u0027140321705310624\u0027\u003e\nget_errno_mock \u003d \u003cMagicMock name\u003d\u0027get_errno\u0027 id\u003d\u0027140321705396448\u0027\u003e\n\n    def test_fallocate(self, sys_fallocate_mock,\n                       sys_posix_fallocate_mock, get_errno_mock):\n        sys_fallocate_mock.available \u003d True\n        sys_fallocate_mock.return_value \u003d 0\n    \n        utils.fallocate(1234, 5000 * 2 ** 20)\n    \n        # We can\u0027t use sys_fallocate_mock.assert_called_once_with because no\n        # two ctypes.c_uint64 objects are equal even if their values are\n        # equal. Yes, ctypes.c_uint64(123) !\u003d ctypes.c_uint64(123).\n        calls \u003d sys_fallocate_mock.mock_calls\n\u003e       self.assertEqual(len(calls), 1)\nE       AssertionError: 0 !\u003d 1\n\nswift/test/unit/common/test_utils.py:6785: AssertionError\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d short test summary info \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nFAILED swift/test/unit/common/test_utils.py::TestFallocate::test_fallocate - AssertionError: 0 !\u003d 1\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 failed, 1 passed in 0.51s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n```\n\nthis change:\n\n```\nvagrant@saio:~$ pytest swift/test/unit/obj/test_diskfile.py::TestDiskFile::test_create_close_oserror swift/test/unit/common/test_utils.py::TestFallocate::test_fallocate\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nplatform linux -- Python 3.10.12, pytest-8.4.1, pluggy-1.6.0 -- /usr/bin/python3\ncachedir: .pytest_cache\nrootdir: /home/vagrant/swift\nconfigfile: tox.ini\nplugins: subtests-0.14.2, cov-6.2.1\ncollected 2 items                                                                                                                                                                                                                                      \n\nswift/test/unit/obj/test_diskfile.py::TestDiskFile::test_create_close_oserror PASSED                                                                                                                                                             [ 50%]\nswift/test/unit/common/test_utils.py::TestFallocate::test_fallocate PASSED                                                                                                                                                                       [100%]\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 2 passed in 0.35s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n```","commit_id":"1a97c54766e9254ba4f1bf2e64e5a2d53e102ec6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90bb449cc5943d368499e399707400dfb0ce4f03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e11d1719_22d05298","updated":"2025-09-16 00:28:01.000000000","message":"Tim I\u0027m glad you\u0027re thinking about ways this code could be better.  I assume the +1 is because you agree test_diskfile shouldn\u0027t pollute the global state of the utils module and this change does that.\n\nSo what\u0027s the reservation exactly?  I\u0027m not trying to make a career out of this pre-req change: it was just in my way.  Feel free to push over (or follow-up?) if the comment is a blocker or you think you can add a more elegant assertion.","commit_id":"7cdbd21548789d5fe88dc7ac8f8653288bb8f87f"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"803cef554a24e4d7993718d55a94942d4b071974","unresolved":true,"context_lines":[{"line_number":5032,"context_line":"        # This is a horrible hack so you can run this test in isolation."},{"line_number":5033,"context_line":"        # Some of the ctypes machinery calls os.close(), and that runs afoul"},{"line_number":5034,"context_line":"        # of our mock."},{"line_number":5035,"context_line":"        with mock.patch.object(utils, \u0027_sys_fallocate\u0027, None):"},{"line_number":5036,"context_line":"            utils.disable_fallocate()"},{"line_number":5037,"context_line":""},{"line_number":5038,"context_line":"            df \u003d self.df_mgr.get_diskfile(self.existing_device, \u00270\u0027, \u0027abc\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"b9a91a08_d849d9d1","side":"PARENT","line":5035,"updated":"2025-09-15 19:14:58.000000000","message":"FWIW `with mock.patch.object(utils, \u0027_sys_fallocate\u0027):` also seems to work, setting it to None ran into a TypeError.","commit_id":"82cb5a5d78b91c6af258cd8f06d30f69be90fa18"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"803cef554a24e4d7993718d55a94942d4b071974","unresolved":true,"context_lines":[{"line_number":5032,"context_line":"        err \u003d OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":5033,"context_line":"        # the fallocate ctypes machineary will call os.close dynamically if"},{"line_number":5034,"context_line":"        # this test is run in isolation and therefore not yet cached"},{"line_number":5035,"context_line":"        with mock.patch.object(utils, \u0027_fallocate_enabled\u0027, False):"},{"line_number":5036,"context_line":"            df \u003d self.df_mgr.get_diskfile(self.existing_device, \u00270\u0027, \u0027abc\u0027,"},{"line_number":5037,"context_line":"                                          \u0027123\u0027, \u0027xyz\u0027, policy\u003dPOLICIES.legacy)"},{"line_number":5038,"context_line":"            with mock.patch(\"swift.obj.diskfile.os.close\") as mock_close:"}],"source_content_type":"text/x-python","patch_set":1,"id":"e7068011_18fe8a12","line":5035,"updated":"2025-09-15 19:14:58.000000000","message":"but this seemed more obvious and in the spirit of `disable_fallocate`","commit_id":"1a97c54766e9254ba4f1bf2e64e5a2d53e102ec6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"94ca2c943858690ff800e8fa5b4046a9e46fd7fb","unresolved":true,"context_lines":[{"line_number":5031,"context_line":"    def test_create_close_oserror(self):"},{"line_number":5032,"context_line":"        err \u003d OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":5033,"context_line":"        # the fallocate ctypes machineary will call os.close dynamically if"},{"line_number":5034,"context_line":"        # this test is run in isolation and therefore not yet cached"},{"line_number":5035,"context_line":"        with mock.patch.object(utils, \u0027_fallocate_enabled\u0027, False):"},{"line_number":5036,"context_line":"            df \u003d self.df_mgr.get_diskfile(self.existing_device, \u00270\u0027, \u0027abc\u0027,"},{"line_number":5037,"context_line":"                                          \u0027123\u0027, \u0027xyz\u0027, policy\u003dPOLICIES.legacy)"}],"source_content_type":"text/x-python","patch_set":2,"id":"289b7291_c789d0f0","line":5034,"range":{"start_line":5034,"start_character":62,"end_line":5034,"end_character":68},"updated":"2025-09-15 23:43:25.000000000","message":"What\u0027s cached where now?\n\nWould this be accurate?\n```\n# Disable fallocate for this test. Otherwise, the ctypes machinery may also\n# call os.close (for example, when this test is run in isolation), but we\u0027re\n# only interested in what diskfile is doing.\n```","commit_id":"7cdbd21548789d5fe88dc7ac8f8653288bb8f87f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90bb449cc5943d368499e399707400dfb0ce4f03","unresolved":false,"context_lines":[{"line_number":5031,"context_line":"    def test_create_close_oserror(self):"},{"line_number":5032,"context_line":"        err \u003d OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":5033,"context_line":"        # the fallocate ctypes machineary will call os.close dynamically if"},{"line_number":5034,"context_line":"        # this test is run in isolation and therefore not yet cached"},{"line_number":5035,"context_line":"        with mock.patch.object(utils, \u0027_fallocate_enabled\u0027, False):"},{"line_number":5036,"context_line":"            df \u003d self.df_mgr.get_diskfile(self.existing_device, \u00270\u0027, \u0027abc\u0027,"},{"line_number":5037,"context_line":"                                          \u0027123\u0027, \u0027xyz\u0027, policy\u003dPOLICIES.legacy)"}],"source_content_type":"text/x-python","patch_set":2,"id":"d5cbfa87_de95e30f","line":5034,"range":{"start_line":5034,"start_character":62,"end_line":5034,"end_character":68},"in_reply_to":"289b7291_c789d0f0","updated":"2025-09-16 00:28:01.000000000","message":"the way I understood the pre-existing comment was that mocking os.close to error works as expected - but only if we\u0027ve already called load_libc_function:\n\nhttps://github.com/NVIDIA/swift/blob/master/swift/common/utils/libc.py#L170\n\n\u003e Would this be accurate?\n\nI think both comments are accurate - i\u0027m not sure which is most clear - but neither comment will effect the fix.  The change isn\u0027t about the comment.","commit_id":"7cdbd21548789d5fe88dc7ac8f8653288bb8f87f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"94ca2c943858690ff800e8fa5b4046a9e46fd7fb","unresolved":true,"context_lines":[{"line_number":5039,"context_line":"                mock_close.side_effect \u003d err"},{"line_number":5040,"context_line":"                with df.create(size\u003d200) as dfw:"},{"line_number":5041,"context_line":"                    fd \u003d dfw._fd"},{"line_number":5042,"context_line":"        self.assertEqual([mock.call(fd)], mock_close.call_args_list)"},{"line_number":5043,"context_line":""},{"line_number":5044,"context_line":"    def test_write_metadata(self):"},{"line_number":5045,"context_line":"        df, df_data \u003d self._create_test_file(b\u00271234567890\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4298f73d_91045e90","line":5042,"range":{"start_line":5042,"start_character":53,"end_line":5042,"end_character":67},"updated":"2025-09-15 23:43:25.000000000","message":"Assertions are good! I always forget about `call_args_list` -- I almost always use `mock_calls`...\n\nI wonder a little if we might prefer to just say `self.assertIn(mock.call(fd), mock_close.call_args_list)` and stop worrying about the state of fallocate...","commit_id":"7cdbd21548789d5fe88dc7ac8f8653288bb8f87f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"90bb449cc5943d368499e399707400dfb0ce4f03","unresolved":false,"context_lines":[{"line_number":5039,"context_line":"                mock_close.side_effect \u003d err"},{"line_number":5040,"context_line":"                with df.create(size\u003d200) as dfw:"},{"line_number":5041,"context_line":"                    fd \u003d dfw._fd"},{"line_number":5042,"context_line":"        self.assertEqual([mock.call(fd)], mock_close.call_args_list)"},{"line_number":5043,"context_line":""},{"line_number":5044,"context_line":"    def test_write_metadata(self):"},{"line_number":5045,"context_line":"        df, df_data \u003d self._create_test_file(b\u00271234567890\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"03ce9183_84c47e93","line":5042,"range":{"start_line":5042,"start_character":53,"end_line":5042,"end_character":67},"in_reply_to":"4298f73d_91045e90","updated":"2025-09-16 00:28:01.000000000","message":"\u003e stop worrying about the state of fallocate...\n\nwell, except we\u0027re patching os.close to provoke an error?  So we\u0027d have to improve our fake to know when it should pass through to orig_close vs raise an error.","commit_id":"7cdbd21548789d5fe88dc7ac8f8653288bb8f87f"}]}
