We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a36be75 commit e742259Copy full SHA for e742259
tests/python/unit/test_types.py
@@ -0,0 +1,20 @@
1
+#
2
+# Copyright (C) 2025 Intel Corporation
3
+# SPDX-License-Identifier: Apache-2.0
4
5
+
6
+from model_api.models.types import ListValue
7
8
9
+def test_string_list_parameter():
10
+ str_list = ListValue(
11
+ value_type=str,
12
+ description="List of strings",
13
+ default_value=["label1", "label2", "label3"],
14
+ )
15
+ assert str_list.value_type == str
16
17
+ parsed_list = str_list.from_str("1 2 3")
18
19
+ assert len(parsed_list) == 3
20
+ assert type(parsed_list[0]) is str
0 commit comments