From 5dcb521919eafebcceb12f473c3312537ac50474 Mon Sep 17 00:00:00 2001 From: David C Ellis Date: Thu, 5 Dec 2024 14:00:29 +0000 Subject: [PATCH] Construct the union in stages for Python 3.10 --- tests/test_sql_classes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_sql_classes.py b/tests/test_sql_classes.py index 8e94202..090ee5d 100644 --- a/tests/test_sql_classes.py +++ b/tests/test_sql_classes.py @@ -44,8 +44,11 @@ def test_type_map(): # Check that the MAPPED_TYPES matches the union of types in TYPE_MAP - mapped_type_construct = typing.Union[*TYPE_MAP.keys()] - assert MAPPED_TYPES == mapped_type_construct + union = None + for t in TYPE_MAP.keys(): + union = typing.Union[union, t] + + assert MAPPED_TYPES == union class TestListFlattenSeparate: