()
| 47 | |
| 48 | @t.skip.if_win32 |
| 49 | def test_fd_by_path(): |
| 50 | test_file = tempfile.NamedTemporaryFile() |
| 51 | try: |
| 52 | keep = fd_by_path([test_file.name]) |
| 53 | assert keep == [test_file.file.fileno()] |
| 54 | with patch('os.open') as _open: |
| 55 | _open.side_effect = OSError() |
| 56 | assert not fd_by_path([test_file.name]) |
| 57 | finally: |
| 58 | test_file.close() |
| 59 | |
| 60 | |
| 61 | @t.skip.if_win32 |
nothing calls this directly
no test coverage detected