remove special handling code for old Python versions from tests
allow "xmlfile(f, close=True)" to automatically close the file object after use