Skip to content

Commit

Permalink
Remove numpy test runner imports
Browse files Browse the repository at this point in the history
This has been removed from numpy, and caused the tests to error.
  • Loading branch information
aragilar committed Jun 30, 2023
1 parent dc2dccc commit 9fb0ca2
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 64 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ prune ipython_examples

exclude *.enc
exclude upload_api_docs.sh
exclude .readthedocs.yaml
16 changes: 1 addition & 15 deletions scikits/odes/tests/test_dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from numpy import (arange, zeros, array, dot, sqrt, cos, sin, allclose,
empty)

from numpy.testing import TestCase, run_module_suite
from numpy.testing import TestCase
from scipy.integrate import ode as Iode
from scikits.odes import ode,dae
from scikits.odes.sundials import _get_num_args
Expand Down Expand Up @@ -392,17 +392,3 @@ def verify(self, y, yp, t):
SimpleOscillator,
StiffVODECompare,
]
#------------------------------------------------------------------------------

if __name__ == "__main__":
try:
run_module_suite()
except NameError:
test = TestDae()
test.test_ddaspk()
test.test_lsodi()
test.test_ida_old_api()
test.test_ida()
test = TestGetNumArgs()
test.test_functions()
test.test_methods()
2 changes: 1 addition & 1 deletion scikits/odes/tests/test_dop.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np

from numpy.testing import (
assert_, TestCase, run_module_suite, assert_array_almost_equal,
assert_, TestCase, assert_array_almost_equal,
assert_raises, assert_allclose, assert_array_equal, assert_equal)
from scikits.odes import ode
from scikits.odes.dopri5 import StatusEnumDOP
Expand Down
6 changes: 1 addition & 5 deletions scikits/odes/tests/test_odeint.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
allclose)

from numpy.testing import (
assert_, TestCase, run_module_suite, assert_array_almost_equal,
assert_, TestCase, assert_array_almost_equal,
assert_raises, assert_allclose, assert_array_equal, assert_equal)

from scikits.odes.odeint import odeint
Expand Down Expand Up @@ -447,7 +447,3 @@ def badjac(t, x, fx, J):

# shape of array returned by badjac(x, t) is not correct.
assert_raises(ValueError, odeint, sys1, [0, 1], [10, 10], jacfn=badjac)


if __name__ == "__main__":
run_module_suite()
17 changes: 1 addition & 16 deletions scikits/odes/tests/test_on_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from numpy import (arange, zeros, array, dot, sqrt, cos, sin, allclose,
empty)

from numpy.testing import TestCase, run_module_suite
from numpy.testing import TestCase

from scikits.odes import ode
from scikits.odes.sundials.cvode import StatusEnum
Expand Down Expand Up @@ -311,18 +311,3 @@ def test_cvode_tstopfn_test(self):
assert allclose([soln.tstop.t[-1], soln.tstop.y[-1,0], soln.tstop.y[-1,1]],
[30.0, -1452.5024, -294.30],
atol=atol, rtol=rtol)
if __name__ == "__main__":
try:
run_module_suite()
except NameError:
test = TestOn()
test.test_cvode_rootfn_noroot()
test.test_cvode_rootfn()
test.test_cvode_rootfnacc()
test.test_cvode_rootfn_stop()
test.test_cvode_rootfn_test()
test.test_cvode_tstopfn()
test.test_cvode_tstopfn_notstop()
test.test_cvode_tstopfn_stop()
test.test_cvode_tstopfn_test()
test.test_cvode_tstopfnacc()
12 changes: 1 addition & 11 deletions scikits/odes/tests/test_on_funcs_ida.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from numpy import (arange, zeros, array, dot, sqrt, cos, sin, allclose,
empty)

from numpy.testing import TestCase, run_module_suite
from numpy.testing import TestCase

from scikits.odes import dae
from scikits.odes.sundials.ida import StatusEnumIDA
Expand Down Expand Up @@ -312,13 +312,3 @@ def test_ida_tstopfn_test(self):
assert allclose([soln.tstop.t[-1], soln.tstop.y[-1,0], soln.tstop.y[-1,1]],
[30.0, -1452.5024, -294.30],
atol=atol, rtol=rtol)
if __name__ == "__main__":
try:
run_module_suite()
except NameError:
test = TestOn()
test.test_ida_rootfn_noroot()
test.test_ida_rootfn()
test.test_ida_rootfnacc()
test.test_ida_rootfn_stop()
test.test_ida_rootfn_test()
9 changes: 1 addition & 8 deletions scikits/odes/tests/test_user_return_vals_cvode.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from numpy.testing import TestCase, run_module_suite
from numpy.testing import TestCase

from .. import ode
from ..sundials.cvode import StatusEnum
Expand Down Expand Up @@ -315,10 +315,3 @@ class TestCVodesReturn(TestCVodeReturn):
def __init__(self, *args, **kwargs):
super(TestCVodesReturn, self).__init__(*args, **kwargs)
self.solvername = "cvodes"

if __name__ == "__main__":
try:
run_module_suite()
except NameError:
test = TestCVodeReturn()
TestCVodeReturn.test_normal_rhs()
9 changes: 1 addition & 8 deletions scikits/odes/tests/test_user_return_vals_ida.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from numpy.testing import TestCase, run_module_suite
from numpy.testing import TestCase

from .. import dae
from ..sundials.ida import StatusEnumIDA
Expand Down Expand Up @@ -238,10 +238,3 @@ class TestIdasReturn(TestIdaReturn):
def __init__(self, *args, **kwargs):
super(TestIdasReturn, self).__init__(*args, **kwargs)
self.solvername = "idas"

if __name__ == "__main__":
try:
run_module_suite()
except NameError:
test = TestIdaReturn()
test.test_normal_rhs()

0 comments on commit 9fb0ca2

Please sign in to comment.