forked from sandialabs/pyttb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconftest.py
32 lines (23 loc) · 811 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
29
30
31
32
"""Pyttb pytest configuration."""
# Copyright 2024 National Technology & Engineering Solutions of Sandia,
# LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
# U.S. Government retains certain rights in this software.
import numpy
# content of conftest.py
import pytest
import pyttb
@pytest.fixture(autouse=True)
def add_packages(doctest_namespace): # noqa: D103
doctest_namespace["np"] = numpy
doctest_namespace["ttb"] = pyttb
def pytest_addoption(parser): # noqa: D103
parser.addoption(
"--packaging",
action="store_true",
dest="packaging",
default=False,
help="enable slow packaging tests",
)
def pytest_configure(config): # noqa: D103
if not config.option.packaging:
config.option.markexpr = "not packaging"