Add coverage for close() on Python 2