File: conftest.py

package info (click to toggle)
python-pbcommand 2.1.1%2Bgit20231020.28d1635-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,016 kB
  • sloc: python: 7,676; makefile: 220; sh: 73
file content (19 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest


def pytest_runtest_setup(item):
    for mark in item.iter_markers():
        if mark.name == 'pbcore':
            try:
                import pbcore
            except ImportError:
                pytest.skip("'pbcore' not installed")
        elif mark.name == 'pbtestdata':
            try:
                import pbtestdata
            except ImportError:
                pytest.skip("'pbtestdata' not installed")
        elif mark.name == "skipif":
            pass
        else:
            raise LookupError("Unknown pytest mark: '{}'".format(mark.name))