Skip to content

Commit c24453f

Browse files
committed
Add test for conversion to string.
1 parent b306f1d commit c24453f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_stringlist.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,3 +479,9 @@ def test_sort(self):
479479
sl.sort(reverse=True)
480480
assert sl == ["world", "hello", "1234", '', '', '', '', '']
481481
assert isinstance(sl, StringList)
482+
483+
def test_str(self):
484+
sl = StringList(["", '', "hello", "world", '', '', '', "1234"])
485+
assert str(sl) == "\n\nhello\nworld\n\n\n\n1234"
486+
sl = StringList(["", '', "hello", "world", '', '', '', "1234", ''])
487+
assert str(sl) == "\n\nhello\nworld\n\n\n\n1234\n"

0 commit comments

Comments
 (0)