Skip to content

Commit

Permalink
FreeType dealloc test
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Oct 23, 2018
1 parent d8235da commit f460ddc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/freetype_test.py
Expand Up @@ -158,6 +158,14 @@ def test_freetype_Font_init(self):
f.__init__(self._bmp_8_75dpi_path, size=12)
self.assertEqual(f.size, 12.0)

def test_freetype_Font_dealloc(self):
import sys
handle = open(self._sans_path, 'rb')
def load_font():
tempFont = ft.Font(handle)
load_font()
self.assertEqual(sys.getrefcount(handle), 2)

def test_freetype_Font_scalable(self):

f = self._TEST_FONTS['sans']
Expand Down

0 comments on commit f460ddc

Please sign in to comment.