"""Tests for the configiration related utility functions.""" import pytest from snowflake_etl.conf.config import merge_configs @pytest.mark.parametrize('c1,c2,expected', [ (dict(a=1, b=2), dict(c=3), dict(a=1, b=2, c=3)), (dict(a=1, b=2), dict(b=3), dict(a=1, b=3)), (dict(a=1), dict(), dict(a=1)), (dict(), dict(b=3), dict(b=3)), (dict(), dict(), dict()), (dict(a=1), dict(a=None), dict(a=1)), (dict(a=1, b=2, c=3), dict(a=1, b=2, c=3), dict(a=1, b=2, c=3)), (dict(a=1, b=2, c=3), dict(a=2, b=3, c=4), dict(a=2, b=3, c=4)), ]) def test_merge_configs(c1, c2, expected): """Test merge_configs function.""" result = merge_configs(c1, c2) assert result == expected # the function is supposed to instantiate a new dict assert result is not c1 assert result is not c2