aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/test_commons.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-08 16:32:52 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-08 16:32:52 +0100
commitbbfcee4fffc553b5dd08f37a79dd6ccddbf340f8 (patch)
treeca7fda37b4f01fe969b4f9b2497d900cbabc7d4e /test/utils/test_commons.py
parent8c0fbff6e05e5e4afe5605925052f114f2b95ba2 (diff)
downloadbsfs-bbfcee4fffc553b5dd08f37a79dd6ccddbf340f8.tar.gz
bsfs-bbfcee4fffc553b5dd08f37a79dd6ccddbf340f8.tar.bz2
bsfs-bbfcee4fffc553b5dd08f37a79dd6ccddbf340f8.zip
uri and some utils
Diffstat (limited to 'test/utils/test_commons.py')
-rw-r--r--test/utils/test_commons.py31
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 ##