forked from NProfileAnalysisComputationalTool/npact
/
conftest.py
58 lines (39 loc) · 1.16 KB
/
conftest.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"Provide a bunch of test fixtures for pynpact testing"
import logging
import pytest
from path import path
from pynpact import parsing, executors
@pytest.fixture(scope="module", autouse=True)
def setup_logging():
logging.root.setLevel(logging.DEBUG)
logging.basicConfig()
TESTGBK = "testdata/NC_017123.gbk"
TESTFNA = "testdata/NC_017123.fna"
TESTRAW = "testdata/NC_017123.raw"
@pytest.fixture()
def executor():
return executors.InlineExecutor()
@pytest.fixture()
def gbkfile():
gbk = path(__file__).dirname().joinpath(TESTGBK)
assert gbk.exists()
return str(gbk)
@pytest.fixture()
def gbkconfig(gbkfile, tmpdir):
return parsing.initial(gbkfile, outputdir=str(tmpdir))
@pytest.fixture()
def fnafile():
fna = path(__file__).dirname().joinpath(TESTFNA)
assert fna.exists()
return str(fna)
@pytest.fixture()
def fnaconfig(fnafile, tmpdir):
return parsing.initial(fnafile, outputdir=str(tmpdir))
@pytest.fixture()
def rawfile():
raw = path(__file__).dirname().joinpath(TESTRAW)
assert raw.exists()
return str(raw)
@pytest.fixture()
def rawconfig(rawfile, tmpdir):
return parsing.initial(rawfile, outputdir=str(tmpdir))