1 2 3 4 5 6 7 8 9 10
# SF bug #476138: tempfile behavior across platforms # Ensure that a temp file can be closed any number of times without error. import tempfile f = tempfile.TemporaryFile("w+b") f.write('abc\n') f.close() f.close() f.close()