File: conftest.py

package info (click to toggle)
kineticstools 0.6.1%2Bgit20200729.e3723e0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,144 kB
  • sloc: python: 3,505; makefile: 207; ansic: 104; sh: 55; xml: 19
file content (22 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os

import pytest


def _internal_data():
    return os.path.exists("/pbi/dept/secondary/siv/testdata")


def pytest_runtest_setup(item):
    for mark in item.iter_markers():
        if mark.name == 'internal_data':
            if not _internal_data():
                pytest.skip(
                    "need access to '/pbi/dept/secondary/siv/testdata'")
        elif mark.name == 'pybigwig':
            try:
                import pyBigWig
            except ImportError:
                pytest.skip("requires pyBigWig to be installed")
        else:
            raise LookupError("Unknown pytest mark: '{}'".format(mark.name))