11from collections .abc import MutableMapping
2- from operator import eq
2+ import pickle
33from typing import Dict
44
55import pytest
1414from dlt .common .normalizers .naming import sql_ci_v1 , sql_cs_v1
1515
1616from tests .common .configuration .utils import environment
17- from tests .utils import ACTIVE_DESTINATIONS
17+ from tests .utils import IMPLEMENTED_DESTINATIONS
1818
1919
2020def test_import_unknown_destination () -> None :
@@ -166,7 +166,7 @@ def test_import_module_by_path() -> None:
166166
167167def test_import_all_destinations () -> None :
168168 # this must pass without the client dependencies being imported
169- for dest_type in ACTIVE_DESTINATIONS :
169+ for dest_type in IMPLEMENTED_DESTINATIONS :
170170 dest = DestinationReference .from_reference (
171171 dest_type , None , dest_type + "_name" , "production"
172172 )
@@ -175,7 +175,12 @@ def test_import_all_destinations() -> None:
175175 assert dest .config_params ["environment" ] == "production"
176176 assert dest .config_params ["destination_name" ] == dest_type + "_name"
177177 dest .spec ()
178- assert isinstance (dest .capabilities (), DestinationCapabilitiesContext )
178+ caps = dest .capabilities ()
179+ assert isinstance (caps , DestinationCapabilitiesContext )
180+ # make sure caps are pickable
181+ pickled_caps = pickle .dumps (caps )
182+ unpickled_caps = pickle .loads (pickled_caps )
183+ assert caps .supported_loader_file_formats == unpickled_caps .supported_loader_file_formats
179184 # every destination is in the registry
180185 assert dest .destination_type in DestinationReference .DESTINATIONS
181186 assert DestinationReference .find (dest_type ) is DestinationReference .find (
0 commit comments