Spaces:
Running
Running
File size: 991 Bytes
376953f f8637f2 376953f |
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 |
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 |