Skip to content

Commit

Permalink
Tests: silencing fpdf.svg logs (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C authored Nov 21, 2023
1 parent 0065b13 commit 5246a97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This can also be enabled programmatically with `warnings.simplefilter('default',
### Changed
* the public `.images`, `.icc_profiles` & `.image_filter` attributes of `FPDF` instances have been moved inside a nested `FPDF.image_cache` attribute
* the `fpdf.svg` module now produces `WARNING` log messages for unsupported SVG tags & attributes.
If those logs annoy you, you can suppress them: `logging.getLogger("fpdf.svg").level = logging.ERROR`
If those logs annoy you, you can suppress them: `logging.getLogger("fpdf.svg").propagate = False`
* [`FPDF.table()`](https://py-pdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.table): If cell styles are provided for cells in heading rows, combine the cell style as an override with the overall heading style.

## [2.7.6] - 2023-10-11
Expand Down
6 changes: 6 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import gc
import hashlib
import linecache
import logging
import os
import pathlib
import shutil
Expand Down Expand Up @@ -334,6 +335,11 @@ def pytest_addoption(parser):
)


def pytest_configure():
"Disable some loggers."
logging.getLogger("fpdf.svg").propagate = False


@pytest.fixture(scope="module", autouse=True)
def module_memory_usage(request):
start_rss_in_mib = None
Expand Down

0 comments on commit 5246a97

Please sign in to comment.