Skip to content

Commit

Permalink
upload flow. fix unit test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanrijn committed Sep 29, 2016
1 parent 3e9a80f commit 7337d2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/flows/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def side_effect(self):
server_xml = re.sub('<oml:id>[0-9]+</oml:id>', '', server_xml)
server_xml = re.sub('<oml:uploader>[0-9]+</oml:uploader>', '', server_xml)
server_xml = re.sub('<oml:version>[0-9]+</oml:version>', '', server_xml)
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)
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)

for i in range(10):
# Make sure that we replace all occurences of two newlines
Expand Down
6 changes: 5 additions & 1 deletion tests/runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@ def test__run_task_get_arffcontent(self):
clf, task, class_labels)

clf = SGDClassifier(loss='log', random_state=1)
arff_datacontent = openml.runs.functions._run_task_get_arffcontent(
arff_datacontent, arff_tracecontent = openml.runs.functions._run_task_get_arffcontent(
clf, task, class_labels)
# predictions
self.assertIsInstance(arff_datacontent, list)
# trace. SGD does not produce any
self.assertIsInstance(arff_tracecontent, type(None))

# 10 times 10 fold CV of 150 samples
self.assertEqual(len(arff_datacontent), 1500)
for arff_line in arff_datacontent:
Expand Down

0 comments on commit 7337d2a

Please sign in to comment.