예제 #1
0
def test_simple():
    r = str_range('a', 'c')
    assert ''.join(list(r)) == 'abc'
예제 #2
0
def test_same_start_end():
    r = str_range('a', 'a')
    assert iter(r) == r
    assert ''.join(list(r)) == 'a'
예제 #3
0
def test_simple_with_negativestep():
    r = str_range('c', 'a', -2)
    assert ''.join(list(r)) == 'ca'
예제 #4
0
def test_hebrew():
    r = str_range('א', 'ז', 2)
    assert ''.join(list(r)) == 'אגהז'
예제 #5
0
def test_simple_with_step():
    r = str_range('a', 'c', 2)
    assert ''.join(list(r)) == 'ac'