Ejemplo n.º 1
0
def test_revid():
    v = revid()
    assert len(v) == REVID_LENGTH
    print(v)
Ejemplo n.º 2
0
def test_start_end():
    assert revid(EPOCH_START) == '0' * (REVID_LENGTH - 1) + '1'
    assert revid(EPOCH_END) == '1' + '0' * REVID_LENGTH
Ejemplo n.º 3
0
def test_range():
    with pytest.raises(ValueError):
        revid(EPOCH_START - timedelta.resolution)

    with pytest.raises(ValueError):
        revid(EPOCH_END + timedelta.resolution)