File: conftest.py

package info (click to toggle)
python-pbcommand 2.1.1%2Bgit20220616.3f2e6c2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 940 kB
  • sloc: python: 6,929; makefile: 220; sh: 71
file content (17 lines) | stat: -rw-r--r-- 524 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_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")
        else:
            raise LookupError("Unknown pytest mark: '{}'".format(mark.name))