File: conftest.py

package info (click to toggle)
pwndck 0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: python: 388; sh: 52; makefile: 12
file content (12 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
allowed_markers = ("webtest",)


def pytest_collection_modifyitems(items, config):
    # add `always_run` marker to all unmarked items
    for item in items:
        if not any(x.name in allowed_markers for x in item.iter_markers()):
            item.add_marker("always_run")

    # run "always_run" if no marker spec'd
    if not config.getoption("markexpr", "False"):
        config.option.markexpr = "always_run"