Пример #1
0
def test_empty_expansion():
    assert expansion('abc10[]') == 'abc'
Пример #2
0
def test_open_terminate():
    assert expansion('abc100[') == 'abc100['
Пример #3
0
def test_multiple_open():
    assert expansion('abc1[2[3[4[') == 'abc1[2[3[4['
Пример #4
0
def test_two_expansions():
    assert 'abcddfghiii' == expansion('abc2[d]fgh3[i]')
Пример #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')
Пример #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]')
Пример #15
0
def test_basic():
    assert 'abc' == expansion('abc')
Пример #16
0
def test_two_stacks():
    assert 'abcccdabcccd' == expansion('2[ab3[c]d]')
Пример #17
0
def test_one_stack():
    assert 'abcabc' == expansion('2[abc]')
def test_two_stacks():
    assert 'abcccdabcccd' == expansion('2[ab3[c]d]')