File: conftest.py

package info (click to toggle)
eartag 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,984 kB
  • sloc: python: 9,058; sh: 56; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest


def pytest_configure(config):
    config.addinivalue_line("markers", "networked_tests: enable MusicBrainz and AcoustID test")


def pytest_addoption(parser):
    parser.addoption(
        "--networked_tests",
        action="store_true",
        help="Enable MusicBrainz and AcoustID test; not recommended unless you're doing development on them",  # noqa: E501
    )


def pytest_runtest_setup(item):
    if "networked_tests" in item.keywords and not item.config.getoption("--networked_tests"):
        pytest.skip("need --networked_tests option to run this test")