From 03168a2d70ec245df07d4885be987762b7440faa Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 9 Jan 2024 12:23:40 -0800 Subject: [PATCH] Ignore the warning from the logging_timer which happens whenever DFPSplitUsersStage doesn't have any output messages --- .../digital_fingerprinting/test_dfp_split_users_stage.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/examples/digital_fingerprinting/test_dfp_split_users_stage.py b/tests/examples/digital_fingerprinting/test_dfp_split_users_stage.py index bfc5c9366a..aae17e1060 100644 --- a/tests/examples/digital_fingerprinting/test_dfp_split_users_stage.py +++ b/tests/examples/digital_fingerprinting/test_dfp_split_users_stage.py @@ -16,6 +16,7 @@ import json import os import typing +import warnings import pytest @@ -99,7 +100,12 @@ def test_extract_users(config: Config, skip_users=skip_users, only_users=only_users) - results = stage.extract_users(df) + with warnings.catch_warnings(): + # Ignore warning about the log message not being set. This happens whenever there aren't any output_messages + warnings.filterwarnings("ignore", + message="Must set log msg before end of context! Skipping log", + category=UserWarning) + results = stage.extract_users(df) if not include_generic and not include_individual: # Extra check for weird combination