Exemplo n.º 1
0
def test_line():
    h1 = '8928308280fffff'
    h2 = '8928308287bffff'

    out = h3.h3_line(h1, h2)

    expected = ['8928308280fffff', '89283082873ffff', '8928308287bffff']

    assert out == expected
Exemplo n.º 2
0
def test_h3_line():
    h1 = '8a2a84730587fff'
    h2 = '8a2a8471414ffff'

    out = h3.h3_line(h1, h2)

    expected = [
        h1,
        '8a2a8473059ffff',
        '8a2a847304b7fff',
        '8a2a84730487fff',
        '8a2a8473049ffff',
        '8a2a84732b37fff',
        '8a2a84732b17fff',
        '8a2a84732baffff',
        '8a2a84732a37fff',
        '8a2a84732a17fff',
        '8a2a84732aaffff',
        '8a2a84732a8ffff',
        '8a2a84732327fff',
        '8a2a8473232ffff',
        '8a2a8473230ffff',
        '8a2a84732227fff',
        '8a2a84732207fff',
        '8a2a8473221ffff',
        '8a2a847322e7fff',
        '8a2a847322c7fff',
        '8a2a847322dffff',
        '8a2a84714977fff',
        '8a2a84714957fff',
        '8a2a8471495ffff',
        '8a2a84714877fff',
        '8a2a84714857fff',
        '8a2a847148effff',
        '8a2a847148cffff',
        '8a2a84714b97fff',
        '8a2a8471416ffff',
        h2,
    ]

    assert out == expected

    with pytest.raises(ValueError):
        h3.h3_line(h1, '8001fffffffffff')