diff options
author | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 14:21:11 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 14:21:11 +0100 |
commit | 91437ba89d35bf482f3d9671bb99ef2fc69f5985 (patch) | |
tree | e9bfe27e5a641c040cfa8fe747a7cbb28091079c /test/utils/test_commons.py | |
parent | 87e4cd5a4581094f490f79d4f1cf91f51897660f (diff) | |
parent | e94368c75468e3e94382b12705e55d396249eaca (diff) | |
download | bsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.tar.gz bsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.tar.bz2 bsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.zip |
Merge branch 'develop' into main
Diffstat (limited to 'test/utils/test_commons.py')
-rw-r--r-- | test/utils/test_commons.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/utils/test_commons.py b/test/utils/test_commons.py new file mode 100644 index 0000000..ce73788 --- /dev/null +++ b/test/utils/test_commons.py @@ -0,0 +1,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 ## |