File: conftest.py

package info (click to toggle)
bioxtasraw 2.3.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 276,000 kB
  • sloc: python: 74,181; makefile: 29; sh: 21
file content (98 lines) | stat: -rw-r--r-- 2,697 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import os
import copy

import pytest

raw_path = os.path.abspath(os.path.join('.', __file__, '..', '..'))
if raw_path not in os.sys.path:
    os.sys.path.append(raw_path)

import bioxtasraw.RAWAPI as raw

@pytest.fixture(scope="package")
def old_settings():
    settings = raw.load_settings(os.path.join('.', 'data', 'settings_old.cfg'))
    return settings

@pytest.fixture(scope="package")
def gi_sub_profile():
    profile = raw.load_profiles([os.path.join('.', 'data',
            'glucose_isomerase.dat')])[0]
    return profile

@pytest.fixture(scope="package")
def sans_profile():
    profile = raw.load_profiles([os.path.join('.', 'data',
            'sans_data.dat')])[0]
    return profile

@pytest.fixture(scope="package")
def gi_gnom_ift():
    ift = raw.load_ifts([os.path.join('.', 'data',
            'glucose_isomerase.out')])[0]
    return ift

@pytest.fixture(scope="package")
def gi_bift_ift():
    ift = raw.load_ifts([os.path.join('.', 'data',
            'glucose_isomerase.ift')])[0]
    return ift

@pytest.fixture(scope="package")
def gi_dift_ift():
    ift = raw.load_ifts([os.path.join('.', 'data',
            'glucose_isomerase_dift.ift')])[0]
    return ift

@pytest.fixture(scope="package")
def gi_pdb2sas_modelonly_ift():
    ift = raw.load_ifts([os.path.join('.', 'data',
            'gi_pdb2mrc_modelonly.ift')])[0]
    return ift

@pytest.fixture(scope="package")
def gi_pdb2sas_fit_ift():
    ift = raw.load_ifts([os.path.join('.', 'data',
            'gi_pdb2mrc_fit.ift')])[0]
    return ift

@pytest.fixture(scope="package")
def series_dats():
    series = raw.load_series([os.path.join('.', 'data',
            'series_new_dats.hdf5')])[0]
    return series

@pytest.fixture(scope="package")
def series_images():
    series = raw.load_series([os.path.join('.', 'data',
            'series_new_images.hdf5')])[0]
    return series

@pytest.fixture(scope="function")
def clean_gi_sub_profile(gi_sub_profile):
    return copy.deepcopy(gi_sub_profile)

@pytest.fixture(scope='package')
def bsa_series_profiles():
    filenames = [os.path.join('.', 'data', 'series_dats',
        'BSA_001_{:04d}.dat'.format(i)) for i in range(10)]

    profiles = raw.load_profiles(filenames)

    return profiles

@pytest.fixture(scope="package")
def temp_directory(tmp_path_factory):
    return tmp_path_factory.mktemp('raw')

@pytest.fixture(scope="package")
def bsa_series():
    series = raw.load_series([os.path.join('.', 'data',
            'BSA_001.hdf5')])[0]
    return series

@pytest.fixture(scope="package")
def series_sasbdb_keywords():
    series = raw.load_series([os.path.join('.', 'data',
            'series_with_sasbdb_keywords.hdf5')])[0]
    return series