File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ class Type(Enum):
9494 MESSAGE_SINGLE_SELECTION = "message-single-selection"
9595 MESSAGE_MULTI_SELECTION = "message-multi-selection"
9696 MESSAGE_RANKING = "message-ranking"
97+ MARKER = "marker"
9798
9899 tool : Type
99100 name : str
Original file line number Diff line number Diff line change @@ -164,6 +164,24 @@ def test_create_tool(tool_type) -> None:
164164 assert t .tool == tool_type
165165
166166
167+ def test_marker_tool_from_dict_asdict_round_trip () -> None :
168+ marker = {
169+ "schemaNodeId" : "marker-schema-node" ,
170+ "featureSchemaId" : "marker-feature-schema" ,
171+ "required" : False ,
172+ "name" : "Scene boundary" ,
173+ "color" : "#FF0000" ,
174+ "tool" : "marker" ,
175+ "classifications" : [],
176+ "attributes" : None ,
177+ }
178+
179+ tool = Tool .from_dict (marker )
180+
181+ assert tool .tool is Tool .Type .MARKER
182+ assert tool .asdict () == marker
183+
184+
167185@pytest .mark .parametrize ("class_type" , list (Classification .Type ))
168186def test_create_classification (class_type ) -> None :
169187 c = Classification (class_type = class_type , name = "classification" )
You can’t perform that action at this time.
0 commit comments