aboutsummaryrefslogtreecommitdiffstats
path: root/test/reader/test_stat.py
blob: fd9fdcdf2b3ba93e4e0b0a28c78681207c1787f0 (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
"""
# standard imports
import os
import unittest

# bsie imports
from bsie.utils 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 ##