Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Test Version.""" |
||
2 | import unittest |
||
3 | |||
4 | import pytest |
||
5 | |||
6 | from ims_envista.version import Version |
||
7 | |||
8 | |||
9 | class TestVersion(unittest.TestCase): |
||
10 | """Test Version.""" |
||
11 | |||
12 | def test_set_version(self) -> None: |
||
13 | ver = Version("1.0.0") |
||
14 | if ver.number != "1.0.0": |
||
15 | msg = "Expected Version 1.0.0" |
||
16 | raise ValueError(msg) |
||
17 | |||
18 | def test_version_immutable(self) -> None: |
||
19 | ver = Version("1.0.0") |
||
20 | with pytest.raises(TypeError): |
||
21 | ver.number = "1.1.0" |
||
22 |