Tests started failing when run with unittest, had been running fine with pytest for a while.
Tests error out with `OSError: [Errno 9] Bad file descriptor`.
Turns out if you `shutil.copy` something onto a `MagicMock`, you kill `sys.stdout`:
```
from unittest.mock import MagicMock
import shutil
m = MagicMock()
m.__fspath__.__index__() # → 1
shutil.copy(filename, m)
[errors omitted]
print(1) # → OSError: [Errno 9] Bad file descriptor
```
Much head scratching!


