aboutsummaryrefslogtreecommitdiffstats
path: root/test/reader/test_stat.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/reader/test_stat.py')
-rw-r--r--test/reader/test_stat.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/reader/test_stat.py b/test/reader/test_stat.py
new file mode 100644
index 0000000..d12ad9c
--- /dev/null
+++ b/test/reader/test_stat.py
@@ -0,0 +1,34 @@
+"""
+
+Part of the bsie test suite.
+A copy of the license is provided with the project.
+Author: Matthias Baumgartner, 2022
+"""
+# imports
+import os
+import unittest
+
+# bsie imports
+from bsie.base import errors
+
+# objects to test
+from bsie.reader.stat import Stat
+
+
+## code ##
+
+class TestPath(unittest.TestCase):
+ def test_call(self):
+ # test self
+ self.assertEqual(os.stat(__file__), Stat()(__file__))
+ # test invalid file
+ self.assertRaises(errors.ReaderError, Stat(), '')
+ self.assertRaises(errors.ReaderError, Stat(), None)
+
+
+## main ##
+
+if __name__ == '__main__':
+ unittest.main()
+
+## EOF ##