aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_parse_value.py
blob: c3f00de6184a1bb95dff422bfff18955c575c03f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import pytest

from config_file.parsers.parse_value import parse_value


@pytest.mark.parametrize(
    "test_input,expected",
    [
        ("5", 5),
        ("-5", -5),
        ("-234.5", -234.5),
        ("35.5", 35.5),
        ("TRUE", True),
        ("true", True),
        ("false", False),
        ("blah", "blah"),
        (343, 343),
        (3.2, 3.2),
        (True, True),
    ],
)
def test_parse_value(test_input, expected):
    result = parse_value(test_input)
    assert result == expected