Completed
Push — develop ( 7d38f7...827c8b )
by Jace
02:04
created

TestConverter   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 6
c 3
b 0
f 0
dl 0
loc 15
rs 10
1
# pylint: disable=missing-docstring,no-self-use,abstract-class-instantiated
2
3
import pytest
4
5
from yorm.bases import Converter
6
7
8
class TestConverter:
9
10
    """Unit tests for the `Converter` class."""
11
12
    def test_converter_class_cannot_be_instantiated(self):
13
        with pytest.raises(TypeError):
14
            Converter()
15
16
    def test_converter_class_methods_cannot_be_called(self):
17
        with pytest.raises(NotImplementedError):
18
            Converter.create_default()
19
        with pytest.raises(NotImplementedError):
20
            Converter.to_value(None)
21
        with pytest.raises(NotImplementedError):
22
            Converter.to_data(None)
23