Source

pygame / test / freetype_base_test.py

import unittest
import pygame2
import pygame2.freetype.base as base

class FreeTypeTest(unittest.TestCase):
    __tags__ = [ "freetype" ]

    def test_pygame2_freetype_base_get_version(self):

        # __doc__ (as of 2009-05-17) for pygame2.freetype.base.get_version:

        # get_version () -> tuple
        # 
        # Gets the version of the FreeType2 library which was used to build
        # the 'freetype' module.

        version = base.get_version()
        self.assertEqual(len(version), 3)
        self.assertEqual(version[0], 2)

    def test_pygame2_freetype_base_init(self):

        # __doc__ (as of 2009-05-17) for pygame2.freetype.base.init:

        # init () -> None
        # 
        # Initializes the underlying FreeType 2 library.  This method
        # must be called before trying to use any of the functionality
        # of the 'freetype' module.

        # init()
        base.init()
        self.assertEqual(base.was_init(), True)
        
        # quit
        base.quit()
        self.assertEqual(base.was_init(), False)

if __name__ == '__main__':
    unittest.main()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.