Completed
Push — develop ( b4a21c...b1df34 )
by Jace
02:37
created

test_converter_class_cannot_be_instantiated()   A

Complexity

Conditions 2

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 2
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