Skip to content

Commit

Permalink
MDL-57791 tests: Restore logstores pre-test state
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Jul 24, 2017
1 parent e10b29e commit 382a089
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ public function test_ml_training_and_prediction($timesplittingid, $npredictedran
array('modelid' => $model->get_id(), 'action' => 'predicted')));
$this->assertEquals(2 * $npredictedranges, $DB->count_records('analytics_predictions',
array('modelid' => $model->get_id())));

set_config('enabled_stores', '', 'tool_log');
get_log_manager(true);
}

/**
Expand Down Expand Up @@ -271,6 +274,9 @@ public function test_ml_evaluation($modelquality, $ncourses, $expected, $predict
$filtered = $result->status & $expected[$timesplitting];
$this->assertEquals($expected[$timesplitting], $filtered, $message);
}

set_config('enabled_stores', '', 'tool_log');
get_log_manager(true);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/tests/indicators_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,8 @@ public function test_core_indicators() {
$values = $indicator->calculate($sampleids, 'user', $startdate, $enddate);
$this->assertEquals($indicator::get_max_value(), $values[$user1->id][0]);
$this->assertEquals($indicator::get_min_value(), $values[$user2->id][0]);

set_config('enabled_stores', '', 'tool_log');
get_log_manager(true);
}
}

0 comments on commit 382a089

Please sign in to comment.