Skip to content

Commit c5c7337

Browse files
committed
[Added] Test for DataListListCreate
1 parent 58aaaf9 commit c5c7337

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_data_list_nodes.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
DataListInsert,
2121
DataListLast,
2222
DataListLength,
23+
DataListListCreate,
2324
DataListMax,
2425
DataListMin,
2526
DataListPop,
@@ -239,6 +240,20 @@ def test_create_from_string():
239240
assert node.create_list(_dynamic_number=0) == ([],)
240241

241242

243+
def test_list_create():
244+
node = DataListListCreate()
245+
# Testing with string values
246+
assert (node.create_list(item_0=["hello", "world"], item_1=["bye", "bye!"], _dynamic_number=2) ==
247+
([["hello", "world"], ["bye", "bye!"]],))
248+
249+
# Testing with mixed values
250+
assert (node.create_list(item_0=[123, 456], item_1=[True, False], _dynamic_number=2) ==
251+
([[123, 456], [True, False]],))
252+
253+
# Testing with empty list
254+
assert node.create_list(_dynamic_number=0) == ([],)
255+
256+
242257
def test_pop_random():
243258
node = DataListPopRandom()
244259
result_list, item = node.pop_random_element(list=[1])

0 commit comments

Comments
 (0)