Skip to content

Commit 7337d2a

Browse files
committed
upload flow. fix unit test issues
1 parent 3e9a80f commit 7337d2a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

tests/flows/test_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def side_effect(self):
182182
server_xml = re.sub('<oml:id>[0-9]+</oml:id>', '', server_xml)
183183
server_xml = re.sub('<oml:uploader>[0-9]+</oml:uploader>', '', server_xml)
184184
server_xml = re.sub('<oml:version>[0-9]+</oml:version>', '', server_xml)
185-
server_xml = re.sub('<oml:upload_date>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}</oml:upload_date>', '', server_xml)
185+
server_xml = re.sub('<oml:upload_date>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}</oml:upload_date>', '', server_xml)
186186

187187
for i in range(10):
188188
# Make sure that we replace all occurences of two newlines

tests/runs/test_run_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ def test__run_task_get_arffcontent(self):
4343
clf, task, class_labels)
4444

4545
clf = SGDClassifier(loss='log', random_state=1)
46-
arff_datacontent = openml.runs.functions._run_task_get_arffcontent(
46+
arff_datacontent, arff_tracecontent = openml.runs.functions._run_task_get_arffcontent(
4747
clf, task, class_labels)
48+
# predictions
4849
self.assertIsInstance(arff_datacontent, list)
50+
# trace. SGD does not produce any
51+
self.assertIsInstance(arff_tracecontent, type(None))
52+
4953
# 10 times 10 fold CV of 150 samples
5054
self.assertEqual(len(arff_datacontent), 1500)
5155
for arff_line in arff_datacontent:

0 commit comments

Comments
 (0)