Commit 2aff9822 authored by André Anjos's avatar André Anjos 💬
Browse files

Fix test

parent 2bbc979a
......@@ -338,7 +338,7 @@ static int PyBobLearnLibsvmTrainer_setNu
double value = PyFloat_AsDouble(o);
if (PyErr_Occurred()) return -1;
if (value < 0 || value > 1) {
PyErr_SetString(PyExc_ValueError, "nu has to be in range [0,1]");
PyErr_SetString(PyExc_ValueError, "nu has to live in range [0,1]");
return -1;
}
self->cxx->setNu(value);
......
......@@ -67,8 +67,8 @@ def test_get_and_set():
nose.tools.eq_(trainer.degree, 2)
trainer.gamma = 2
nose.tools.eq_(trainer.gamma, 2)
trainer.nu = 2
nose.tools.eq_(trainer.nu, 2)
trainer.nu = 0.5
nose.tools.eq_(trainer.nu, 0.5)
trainer.stop_epsilon = 2
nose.tools.eq_(trainer.stop_epsilon, 2)
trainer.shrinking = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment