forked from Unidata/MetPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
32 lines (26 loc) · 1.09 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (c) 2016,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Configure pytest for metpy."""
import matplotlib
import matplotlib.pyplot
import numpy
import pandas
import pint
import pytest
import scipy
import xarray
import metpy.calc
def pytest_report_header(config, startdir):
"""Add dependency information to pytest output."""
return ('Dependencies: Matplotlib ({}), NumPy ({}), Pandas ({}), '
'Pint ({}), SciPy ({}), Xarray ({})'.format(matplotlib.__version__,
numpy.__version__, pandas.__version__,
pint.__version__, scipy.__version__,
xarray.__version__))
@pytest.fixture(autouse=True)
def doctest_available_modules(doctest_namespace):
"""Make modules available automatically to doctests."""
doctest_namespace['metpy'] = metpy
doctest_namespace['metpy.calc'] = metpy.calc
doctest_namespace['plt'] = matplotlib.pyplot