forked from Unidata/MetPy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
conftest.py
28 lines (22 loc) · 892 Bytes
/
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
# Copyright (c) 2016 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 pint
import pytest
import scipy
import metpy.calc
def pytest_report_header(config, startdir):
"""Add dependency information to pytest output."""
return ('Dependencies: Matplotlib ({}), NumPy ({}), '
'Pint ({}), SciPy ({})'.format(matplotlib.__version__, numpy.__version__,
pint.__version__, scipy.__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