Spaces:
Running
Running
from pathlib import Path | |
import json | |
import storage | |
def test_loading_submitted(): | |
sub_file = Path("../data/persistent/submitted-2024-08-14 07:16:27.351924-02978438-3a8a-413b-84f1-2d3198cba2f8.jsonl") | |
submits = [] | |
with open(sub_file, "r") as f: | |
for line in f: | |
js_dict = json.loads(line) | |
piece = storage.CodeSubmittedEvent(**js_dict) | |
submits.append(piece) | |
assert len(submits) > 0 | |
eval_obj = json.loads(submits[0].evaluation_response) | |
assert len(eval_obj) > 0 | |
def test_loading_submitted2(): | |
sub_file = Path("raw_data_submitted-2024-08-14T07_47_28.731439-5977364a-5411-4f15-9c73-43f90d49c762.jsonl") | |
submits = [] | |
with open(sub_file, "r") as f: | |
for line in f: | |
js_dict = json.loads(line) | |
piece = storage.CodeSubmittedEvent(**js_dict) | |
submits.append(piece) | |
assert len(submits) > 0 | |
eval_obj = json.loads(submits[0].evaluation_response) | |
assert len(eval_obj) > 0 |