1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-03 23:48:07 +03:00

test: only assert on non-debug logs

This commit is contained in:
David Huggins-Daines 2024-08-17 16:54:12 -04:00
parent f262e8ddd5
commit 9e8eaae25d

View File

@ -1,6 +1,7 @@
"""Helpers for tests."""
import functools
import logging
import sys
from pathlib import Path
@ -76,7 +77,7 @@ def assert_no_logs(function):
"""Decorator that asserts that nothing is logged in a function."""
@functools.wraps(function)
def wrapper(*args, **kwargs):
with capture_logs() as logs:
with capture_logs(level=logging.INFO) as logs:
try:
function(*args, **kwargs)
except Exception: # pragma: no cover