Exemplo n.º 1
0
def test_empty_expansion():
    assert expansion('abc10[]') == 'abc'
Exemplo n.º 2
0
def test_open_terminate():
    assert expansion('abc100[') == 'abc100['
Exemplo n.º 3
0
def test_multiple_open():
    assert expansion('abc1[2[3[4[') == 'abc1[2[3[4['
Exemplo n.º 4
0
def test_two_expansions():
    assert 'abcddfghiii' == expansion('abc2[d]fgh3[i]')
Exemplo n.º 5
0
def test_complex():
    assert 'abciaaaazzzzziaaaazzzzziaaaazzzzziaaaazzzzziaaaazzzzzfffabyxzzziyxzzziabyxzzziyxzzziabyxzzziyxzzzi' == expansion(
        'abc5[i2[aa]5[z]]fff3[ab2[yx3[z]i]]')
def test_two_stacks_suffix():
    assert 'abcabcdededefgabcdededefghij' == expansion('abc2[abc3[de]fg]hij')
Exemplo n.º 7
0
def test_two_stacks_suffix():
    assert 'abcabcdededefgabcdededefghij' == expansion('abc2[abc3[de]fg]hij')
def test_basic():
    assert 'abc' == expansion('abc')
def test_one_stack():
    assert 'abcabc' == expansion('2[abc]')
def test_multiple_open():
    assert expansion('abc1[2[3[4[') == 'abc1[2[3[4['
def test_empty_expansion():
    assert expansion('abc10[]') == 'abc'
def test_open_terminate():
    assert expansion('abc100[') == 'abc100['
def test_complex():
    assert 'abciaaaazzzzziaaaazzzzziaaaazzzzziaaaazzzzziaaaazzzzzfffabyxzzziyxzzziabyxzzziyxzzziabyxzzziyxzzzi' == expansion('abc5[i2[aa]5[z]]fff3[ab2[yx3[z]i]]')
def test_two_expansions():
    assert 'abcddfghiii' == expansion('abc2[d]fgh3[i]')
Exemplo n.º 15
0
def test_basic():
    assert 'abc' == expansion('abc')
Exemplo n.º 16
0
def test_two_stacks():
    assert 'abcccdabcccd' == expansion('2[ab3[c]d]')
Exemplo n.º 17
0
def test_one_stack():
    assert 'abcabc' == expansion('2[abc]')
def test_two_stacks():
    assert 'abcccdabcccd' == expansion('2[ab3[c]d]')