Skip to content

Commit dd3e4d7

Browse files
Fix test
1 parent eda70f8 commit dd3e4d7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

causal_testing/json_front/json_class.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def _json_parse(self):
133133
"""Parse a JSON input file into inputs, outputs, metas and a test plan"""
134134
with open(self.paths.json_path, encoding="utf-8") as f:
135135
self.test_plan = json.load(f)
136+
breakpoint()
136137
for data_file in self.paths.data_paths:
137138
df = pd.read_csv(data_file, header=0)
138139
self.data.append(df)
@@ -286,7 +287,7 @@ class JsonClassPaths:
286287
def __init__(self, json_path: str, dag_path: str, data_paths: str):
287288
self.json_path = Path(json_path)
288289
self.dag_path = Path(dag_path)
289-
self.data_paths = [Path(path) for path in data_paths]
290+
self.data_paths = [Path(path) for path in [data_paths]]
290291

291292

292293
@dataclass()

tests/json_front_tests/test_json_class.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def setUp(self) -> None:
2626
dag_file_name = "dag.dot"
2727
data_file_name = "data.csv"
2828
test_data_dir_path = Path("tests/resources/data")
29-
self.json_path = test_data_dir_path / json_file_name
30-
self.dag_path = test_data_dir_path / dag_file_name
31-
self.data_path = test_data_dir_path / data_file_name
29+
self.json_path = str(test_data_dir_path / json_file_name)
30+
self.dag_path = str(test_data_dir_path / dag_file_name)
31+
self.data_path = str(test_data_dir_path / data_file_name)
3232
self.json_class = JsonUtility("logs.log")
3333
self.example_distribution = scipy.stats.uniform(1, 10)
3434
self.input_dict_list = [{"name": "test_input", "type": float, "distribution": self.example_distribution}]

0 commit comments

Comments
 (0)