File: conftest.py

package info (click to toggle)
htseq 2.0.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 103,476 kB
  • sloc: python: 6,280; sh: 211; cpp: 147; makefile: 80
file content (34 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import pytest


def get_data_folder():
    cwd = os.getcwd().rstrip('/')
    if cwd.endswith('example_data'):
        return cwd+'/'
    else:
        return cwd+'/example_data/'


def get_docs_folder():
    cwd = os.getcwd().rstrip('/')
    if cwd.endswith('doc'):
        return cwd+'/'
    elif cwd.endswith('example_data'):
        return cwd[:-len('example_data')]+'doc/'
    else:
        return cwd+'/doc/'


# Same as fixtures
@pytest.fixture(scope="module")
def data_folder():
    return get_data_folder()


@pytest.fixture(scope="module")
def docs_folder():
    return get_docs_folder()