File: conftest.py

package info (click to toggle)
pytest-httpserver 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: python: 2,382; makefile: 77; sh: 21
file content (17 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pytest


def pytest_addoption(parser):
    parser.addoption("--ssl", action="store_true", default=False, help="run ssl tests")
    parser.addoption("--release", action="store_true", default=False, help="run release tests")


def pytest_runtest_setup(item):
    markers = [marker.name for marker in item.iter_markers()]

    if not item.config.getoption("--ssl") and "ssl" in markers:
        pytest.skip()
    if item.config.getoption("--ssl") and "ssl" not in markers:
        pytest.skip()
    if not item.config.getoption("--release") and "release" in markers:
        pytest.skip()