Skip to content

Commit d2b3eec

Browse files
committed
maybe with resolved paths?
1 parent 62b0efb commit d2b3eec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Pytest configuration file for the tests directory."""
22

33
import os
4+
import pathlib
45

56
import pytest
67

@@ -29,7 +30,7 @@ def sample_dataset() -> DrugResponseDataset:
2930
3031
:returns: drug_response, cell_line_input, drug_input
3132
"""
32-
path_data = os.path.join("..", "data")
33+
path_data = str((pathlib.Path("..") / "data").resolve())
3334
drug_response = load_toyv1(path_data)
3435
drug_response.remove_nan_responses()
3536
return drug_response
@@ -42,7 +43,7 @@ def cross_study_dataset() -> DrugResponseDataset:
4243
4344
:returns: drug_response, cell_line_input, drug_input
4445
"""
45-
path_data = os.path.join("..", "data")
46+
path_data = str((pathlib.Path("..") / "data").resolve())
4647
drug_response = load_toyv2(path_data)
4748
drug_response.remove_nan_responses()
4849
return drug_response

tests/test_drp_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Tests for the DRPModel."""
22

33
import os
4+
import pathlib
45
import tempfile
56
from typing import Optional
67

@@ -190,7 +191,7 @@ def test_order_load_and_select_gene_features(
190191
:param sample_dataset: TOYv1 dataset
191192
:param cross_study_dataset: TOYv2 dataset
192193
"""
193-
path_data = os.path.join("..", "data")
194+
path_data = str((pathlib.Path("..") / "data").resolve())
194195
assert sample_dataset.dataset_name == "TOYv1"
195196
assert cross_study_dataset.dataset_name == "TOYv2"
196197
gene_list = "gene_expression_intersection"

0 commit comments

Comments
 (0)