File: conftest.py

package info (click to toggle)
python-aioeafm 1.0.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,084 kB
  • sloc: python: 108; sh: 14; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 541 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pytest


def pytest_addoption(parser):
    parser.addoption(
        "--integration",
        action="store_true",
        help="Run integration tests.",
    )


def pytest_configure(config):
    config.addinivalue_line("markers", "integration: mark test as an integration test")


def pytest_runtest_setup(item):
    isintegration = len(list(item.iter_markers(name="integration"))) > 0
    if isintegration:
        if not item.config.getoption("--integration"):
            pytest.skip("integration tests not selected in this run")