From cbe84da8c351daee2bb5d6ed803912f0c8266aba Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 19 May 2020 10:57:09 +0100 Subject: [PATCH] varLib_test: comment why font.close() is needed --- Tests/varLib/varLib_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/varLib/varLib_test.py b/Tests/varLib/varLib_test.py index d27fe163e..42e04bd9c 100644 --- a/Tests/varLib/varLib_test.py +++ b/Tests/varLib/varLib_test.py @@ -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)