File: conftest.py

package info (click to toggle)
python-intervaltree-bio 1.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 18,036 kB
  • sloc: python: 307; makefile: 8; sh: 5
file content (20 lines) | stat: -rw-r--r-- 692 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
import os

import pytest

def pytest_addoption(parser):
    parser.addoption("--datadir",
                     help="path to data files")

def pytest_generate_tests(metafunc):
    if 'base_url' in metafunc.fixturenames:
        if metafunc.config.option.datadir:
            base_url = ('file://'
                        + os.path.abspath(metafunc.config.option.datadir)
                        + os.sep)
        else:
            base_url = 'http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/'
            # Mirror. Slightly faster and more stable, I believe -KT

            base_url = 'http://kt.era.ee/distribute/pyintervaltree/'
        metafunc.parametrize('base_url',[base_url])