varLib_test: comment why font.close() is needed

This commit is contained in:
Cosimo Lupo 2020-05-19 10:57:09 +01:00
parent a6612aa6b5
commit cbe84da8c3
No known key found for this signature in database
GPG Key ID: 179A8F0895A02F4F

View File

@ -22,6 +22,8 @@ def reload_font(font):
"""(De)serialize to get final binary layout."""
buf = BytesIO()
font.save(buf)
# Close the font to release filesystem resources so that on Windows the tearDown
# method can successfully remove the temporary directory created during setUp.
font.close()
buf.seek(0)
return TTFont(buf)