From e4ecbf523c5ed114bb9c0272c0af3811840843be Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Wed, 7 Feb 2024 18:39:49 -0600 Subject: [PATCH] remove fire_event_if_test (#65) * remove fire_event_if_test * changelog --- .changes/unreleased/Under the Hood-20240206-081323.yaml | 6 ++++++ dbt_common/events/functions.py | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20240206-081323.yaml diff --git a/.changes/unreleased/Under the Hood-20240206-081323.yaml b/.changes/unreleased/Under the Hood-20240206-081323.yaml new file mode 100644 index 00000000..f5565b06 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240206-081323.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Remove `fire_event_if_test` method +time: 2024-02-06T08:13:23.722615-06:00 +custom: + Author: emmyoop + Issue: "66" diff --git a/dbt_common/events/functions.py b/dbt_common/events/functions.py index 6402c791..ad2c40e4 100644 --- a/dbt_common/events/functions.py +++ b/dbt_common/events/functions.py @@ -132,13 +132,6 @@ def fire_event_if( fire_event(lazy_e(), level=level) -# a special case of fire_event_if, to only fire events in our unit/functional tests -def fire_event_if_test( - lazy_e: Callable[[], BaseEvent], level: Optional[EventLevel] = None -) -> None: - fire_event_if(conditional=("pytest" in sys.modules), lazy_e=lazy_e, level=level) - - # top-level method for accessing the new eventing system # this is where all the side effects happen branched by event type # (i.e. - mutating the event history, printing to stdout, logging