Oh, I understand now what you mean by your first comment :-) fds should be closed in directly test.

BTW: Yes, subprocess package works with fd not with python files.