Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicor88 committed Aug 17, 2023
1 parent d860976 commit 4fb5d06
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from dbt.events.eventmgr import LineFormat, NoFilter
from dbt.events.functions import EVENT_MANAGER, _get_stdout_config

# Import the fuctional fixtures as a plugin
# Import the functional fixtures as a plugin
# Note: fixtures with session scope need to be local

pytest_plugins = ["dbt.tests.fixtures.project"]
Expand Down Expand Up @@ -42,11 +42,14 @@ def dbt_debug_caplog() -> StringIO:

def _setup_custom_caplog(name: str, level: EventLevel):
capture_config = _get_stdout_config(
line_format=LineFormat.PlainText, level=level, use_colors=False, debug=True, log_cache_events=True, quiet=False
line_format=LineFormat.PlainText,
level=level,
use_colors=False,
log_cache_events=True,
)
capture_config.name = name
capture_config.filter = NoFilter
stringbuf = StringIO()
capture_config.output_stream = stringbuf
string_buf = StringIO()
capture_config.output_stream = string_buf
EVENT_MANAGER.add_logger(capture_config)
return stringbuf
return string_buf

0 comments on commit 4fb5d06

Please sign in to comment.