blob: ce737883b7d2bb323be158a7bff6ba78ddd6aae2 (
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
26
27
28
29
30
31
|
"""
Part of the tagit test suite.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2022
"""
# imports
import unittest
# objects to test
from bsfs.utils.commons import typename
## code ##
class TestCommons(unittest.TestCase):
def test_typename(self):
class Foo(): pass
self.assertEqual(typename(Foo()), 'Foo')
self.assertEqual(typename('hello'), 'str')
self.assertEqual(typename(123), 'int')
self.assertEqual(typename(None), 'NoneType')
## main ##
if __name__ == '__main__':
unittest.main()
## EOF ##
|