Exemplo n.º 1
0
def test_indents_4():
    eq_(bdl_utils.add_indents("""#!benchDL
pool(size = 1,
    worker_type = dummy_worker):
 do_stuff(1,2)"""),
"""#!benchDL
pool(size = 1,
    worker_type = dummy_worker):
_INDENT_ do_stuff(1,2)
_DEDENT_ """)
Exemplo n.º 2
0
def test_indents_6():
    eq_(bdl_utils.add_indents('#!benchDL\n'
        'pool(size = 1, attrib = "\\\"#("):\n'
        ' do_stuff(3)\n'
        '   #comment\n do_stuff(1,2)'),
        '#!benchDL\n'
        'pool(size = 1, attrib = "\\\"#("):\n'
        '_INDENT_ do_stuff(3)\n'
        '   #comment\n'
        ' do_stuff(1,2)\n'
        '_DEDENT_ ')
Exemplo n.º 3
0
def test_indents():
    eq_(bdl_utils.add_indents('#!benchDL\nmake_install(git = "[email protected]:foo/bar", branch = "b")'),
        '#!benchDL\nmake_install(git = "[email protected]:foo/bar", branch = "b")')
Exemplo n.º 4
0
def test_indents_3():
    eq_(bdl_utils.add_indents('#!benchDL\npool(size = 1):\n do_stuff(2,3)\n   #comment\n do_stuff(1,2)'),
        '#!benchDL\npool(size = 1):\n_INDENT_ do_stuff(2,3)\n   #comment\n do_stuff(1,2)\n_DEDENT_ ')