Skip to content

Commit f8145be

Browse files
fix test
1 parent 245739e commit f8145be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

services/api-server/tests/unit/test_services_solver_job_outputs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pylint: disable=unused-variable
44

55
import types
6-
from typing import get_args, get_origin
6+
from typing import get_args, get_origin, Union
77

88
from simcore_service_api_server.models.schemas.jobs import ArgumentTypes, File
99
from 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)

0 commit comments

Comments
 (0)