summaryrefslogtreecommitdiff
path: root/python/evemu/tests/test_base.py
blob: 0b72abd697955d7770a2d8d1d3b3db86aff0dde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import unittest

from evemu import const
from evemu.base import EvEmuBase
from evemu.testing import testcase


class EvEmuBaseTestCase(testcase.BaseTestCase):

    def test_so_library_found(self):
        wrapper = EvEmuBase(self.library)
        # Make sure that the library loads
        self.assertNotEqual(
            wrapper._lib._name.find("libutouch-evemu"), -1)

    def test_c_symbols_found(self):
        # Make sure that the expected functions are present
        wrapper = EvEmuBase(self.library)
        for function_name in const.API:
            function = getattr(wrapper._lib, function_name)
            self.assertTrue(function is not None)


if __name__ == "__main__":
    unittest.main()