bidict/run_tests.py

30 lines
936 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
2021-01-01 17:14:24 +00:00
# Copyright 2009-2021 Joshua Bronson. All Rights Reserved.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# First run all tests that pytest discovers.
"""Run all tests."""
import sys
from functools import reduce
from operator import or_
from pytest import main as pytest_main
from sphinx.cmd.build import main as sphinx_main
TEST_FUNCS = [
pytest_main,
# pytest's doctest support doesn't support Sphinx extensions
# (see https://www.sphinx-doc.org/en/latest/usage/extensions/doctest.html)
# so †est the code in the Sphinx docs using Sphinx's own doctest support.
lambda: sphinx_main('-b doctest -d docs/_build/doctrees docs docs/_build/doctest'.split()),
]
sys.exit(reduce(or_, (f() for f in TEST_FUNCS)))