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_ """)
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_ ')
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")')
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_ ')