numerical-mathematics / extrapolation

Parallel extrapolation for ODEs
MIT License
6 stars 1 forks source link

ValueError when running nosetests #4

Closed ketch closed 8 years ago

ketch commented 9 years ago

On my machine, I get the following:

» nosetests -x
E
======================================================================
ERROR: tests.test1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ketch/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/ketch/Research/Projects/extrapolation/tests.py", line 164, in test1
    tst(f_1, t0, tf, exact_1, "TEST 1")
  File "/Users/ketch/Research/Projects/extrapolation/tests.py", line 145, in tst
    title=(test_name + ": adaptive Midpoint"))
  File "/Users/ketch/Research/Projects/extrapolation/tests.py", line 81, in tst_adaptive
    y, fe_order[i] = method(f, t0, tf, y0, p=order, atol=(tol[i]), rtol=(tol[i]), exact=exact, adaptive="order")
ValueError: too many values to unpack

Digging deeper, I see that the code is calling ex_serial.extrapolation_serial with adaptive="order", in which case that function returns 4 values. So it seems that this code cannot work.

ketch commented 9 years ago

Okay, digging even deeper I see that the code silently switches to non-adaptive when using Euler, because adaptive Euler is not implemented. I think that's a dangerous approach -- I'm going to make it raise a notimplementederror instead, and remove this test.

mcr222 commented 8 years ago

All tests are updated now. I recommend reading the Wiki page 'Tests usage' to see how to use them.