Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/test_proxy_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,18 @@ def test_line_proxy_list_insert_2_at_middle():
assert red.dumps() == "while a:\n pass\n c\n pass\n"


def test_line_proxy_list_insert_comment():
red = RedBaron("while a:\n pass\n")
red[0].value.insert(0, "#c")
assert red.dumps() == "while a:\n #c\n pass\n"


def test_line_proxy_list_insert_comment_as_baron():
red = RedBaron("while a:\n pass\n")
red[0].value.insert(0, RedBaron("#c"))
assert red.dumps() == "while a:\n #c\n pass\n"


def test_line_proxy_list_append():
red = RedBaron("while a:\n pass\n")
red[0].value.append("c")
Expand Down