()
| 186 | |
| 187 | |
| 188 | def 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 | |
| 197 | def test_close_open_fds_ignores_ebadf(): |
nothing calls this directly
no test coverage detected