-
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathconftest.py
More file actions
37 lines (26 loc) · 1 KB
/
conftest.py
File metadata and controls
37 lines (26 loc) · 1 KB
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
# Global settings for tests. Run before any test
import os
import pytest
from scipy.io import loadmat
@pytest.fixture(scope="session")
def download_path():
path = os.path.join("tests", "test_data")
os.makedirs(path, exist_ok=True)
return path
@pytest.fixture(scope="session")
def gait(download_path):
return loadmat(os.path.join(download_path, "gait.mat"))
@pytest.fixture(scope="session")
def office_path(download_path):
path_ = os.path.join(download_path, "office")
os.makedirs(path_, exist_ok=True)
return path_
# Downloads and unzips remote file
@pytest.fixture(scope="session")
def landmark_uncertainty_tuples_path(download_path):
path_ = download_path
os.makedirs(path_, exist_ok=True)
valid_path = os.path.join(path_, "Uncertainty_tuples/U-NET/SA/uncertainty_pairs_valid_t0")
test_path = os.path.join(path_, "Uncertainty_tuples/U-NET/SA/uncertainty_pairs_test_t0")
dl_path = os.path.join(path_, "Uncertainty_tuples")
return valid_path, test_path, dl_path