diff --git a/libs/community/tests/unit_tests/chat_models/test_snowflake.py b/libs/community/tests/unit_tests/chat_models/test_snowflake.py index 7a9d521bd6c77e..16e5e2cc8336e5 100644 --- a/libs/community/tests/unit_tests/chat_models/test_snowflake.py +++ b/libs/community/tests/unit_tests/chat_models/test_snowflake.py @@ -141,8 +141,18 @@ def test_session_handled_outside_not_closed() -> None: mock_del.assert_called_once() sp_session_mock.close.assert_not_called() - -def test_del_called_without_session_provided() -> None: +@pytest.mark.parametrize( + "set_env_vars", + [{ + "temp_env_vars": { + "SNOWFLAKE_USERNAME": "user", + "SNOWFLAKE_ACCOUNT": "account", + "SNOWFLAKE_PASSWORD": "password", + } + }], + indirect=["set_env_vars"], +) +def test_del_called_without_session_provided(set_env_vars: Any) -> None: obj = ChatSnowflakeCortex() with patch.object( ChatSnowflakeCortex, "__del__", wraps=ChatSnowflakeCortex.__del__