Exemplo n.º 1
0
def test_merge_adjacent_not_numeric():
    with pytest.raises((TypeError, ValueError)):
        humanize.merge_adjacent("xyz")
Exemplo n.º 2
0
def test_merge_adjacent_with_custom_indicator():
    result = humanize.merge_adjacent("123", '-')
    assert result == ["1-3"]
Exemplo n.º 3
0
def test_merge_adjacent_with_explicit_base():
    result = humanize.merge_adjacent(['10', '3'], base=4)
    assert result == ["3..10"]
Exemplo n.º 4
0
def test_merge_adjacent_basic(numbers, expected):
    result = humanize.merge_adjacent(numbers)
    assert result == expected