blob: d12ad9c6d48f7eca451b02c898454a83e3d2aa21 (
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
32
33
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 ##
|