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