DM-5561 I have written an additional test case in lsst.utils.tests to check for leaks of file descriptors. To do this I use the psutil package from PyPI. It would be really useful if I could add psutil as a stack dependency. psutil seems to be very portable (python 2.6+, windows/solaris/linux/bsd/OSX) and has no dependencies.
The two alternatives I have are:
- Copy the code from meas_astrom/tests/openFiles.py which uses lsof and is not overly portable.
- Only run the test if psutil is installed.