<reponame>AustinScola/illud<filename>tests/test_character.py
"""Test illud.character."""
from typing import Any

import pytest

from illud.character import Character


# yapf: disable
@pytest.mark.parametrize('value', [
    ('i'),
])
# yapf: enable
def test_init(value: str) -> None:
    """Test illud.character.Character.__init__."""
    character: Character = Character(value)

    assert character.value == value


# yapf: disable
@pytest.mark.parametrize('character, other, expected_equality', [
    (Character('i'), 'foo', False),
    (Character('i'), Character('v'), False),
    (Character('i'), Character('i'), True),
])
# yapf: enable
def test_eq(character: Character, other: Any, expected_equality: bool) -> None:
    """Test illud.character.Character.__eq__."""
    equality: bool = character == other
    assert equality == expected_equality


# yapf: disable
@pytest.mark.parametrize('character, expected_printable', [
    (Character('a'), True),
    (Character('\x07'), False),
])
# yapf: enable
def test_printable(character: Character, expected_printable: bool) -> None:
    """Test illud.character.Character.printable."""
    printable: bool = character.printable

    assert printable == expected_printable

"""Test illud.character."""
from typing import Any

import pytest

from illud.character import Character


# yapf: disable
@pytest.mark.parametrize('value', [
    ('i'),
])
# yapf: enable
def test_init(value: str) -> None:
    """Test illud.character.Character.__init__."""
    character: Character = Character(value)

    assert character.value == value


# yapf: disable
@pytest.mark.parametrize('character, other, expected_equality', [
    (Character('i'), 'foo', False),
    (Character('i'), Character('v'), False),
    (Character('i'), Character('i'), True),
])
# yapf: enable
def test_eq(character: Character, other: Any, expected_equality: bool) -> None:
    """Test illud.character.Character.__eq__."""
    equality: bool = character == other
    assert equality == expected_equality


# yapf: disable
@pytest.mark.parametrize('character, expected_printable', [
    (Character('a'), True),
    (Character('\x07'), False),
])
# yapf: enable
def test_printable(character: Character, expected_printable: bool) -> None:
    """Test illud.character.Character.printable."""
    printable: bool = character.printable

    assert printable == expected_printable
Test illud.character. # yapf: disable # yapf: enable Test illud.character.Character.__init__. # yapf: disable # yapf: enable Test illud.character.Character.__eq__. # yapf: disable # yapf: enable Test illud.character.Character.printable.