TestVersion.test_version_immutable()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 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