summaryrefslogtreecommitdiff
path: root/pelican/tests/__init__.py
blob: 564e417cf557072f25172be2b5ddae446f190c44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import logging
import warnings

from pelican.log import log_warnings

# redirect warnings module to use logging instead
log_warnings()

# setup warnings to log DeprecationWarning's and error on
# warnings in pelican's codebase
warnings.simplefilter("default", DeprecationWarning)
warnings.filterwarnings("error", ".*", Warning, "pelican")

# Add a NullHandler to silence warning about no available handlers
logging.getLogger().addHandler(logging.NullHandler())