MCPcopy Create free account
hub / github.com/celery/celery / test_close_open_fds_accepts_file_objects

Function test_close_open_fds_accepts_file_objects

t/unit/utils/test_platforms.py:188–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187
188def test_close_open_fds_accepts_file_objects():
189 fh = Mock(name='fh')
190 fh.fileno.return_value = 3
191 with patch('celery.platforms._open_fds', return_value=[3, 4]), \
192 patch('os.close') as close_mock:
193 close_open_fds([fh])
194 close_mock.assert_called_once_with(4)
195
196
197def test_close_open_fds_ignores_ebadf():

Callers

nothing calls this directly

Calls 1

close_open_fdsFunction · 0.90

Tested by

no test coverage detected