File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
services/api-server/tests/unit Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33# pylint: disable=unused-variable
44
55import types
6- from typing import get_args , get_origin
6+ from typing import get_args , get_origin , Union
77
88from simcore_service_api_server .models .schemas .jobs import ArgumentTypes , File
99from simcore_service_api_server .services .solver_job_outputs import (
@@ -16,10 +16,11 @@ def test_resultstypes_and_argument_type_sync():
1616 # I/O types returned by node-ports must be one-to-one mapped
1717 # with those returned as output results
1818
19- assert get_origin (ArgumentTypes ) == types .UnionType
19+ # Python 3.10 and later treats unions with | as types.UnionType
20+ assert get_origin (ArgumentTypes ) in (types .UnionType , Union )
2021 argument_types_args = set (get_args (ArgumentTypes ))
2122
22- assert get_origin (ResultsTypes ) == types .UnionType
23+ assert get_origin (ResultsTypes ) in ( types .UnionType , Union )
2324 results_types_args = set (get_args (ResultsTypes ))
2425
2526 # files are in the inputs as File (or Raises KeyError if not)
You can’t perform that action at this time.
0 commit comments