# -*- coding: utf-8 -*- import numpy as np from pyodesys.util import import_ from pyodesys.core import integrate_chained from pyodesys.symbolic import SymbolicSys, PartiallySolvedSystem, symmetricsys, TransformedSys from pyodesys.tests._robertson import get_ode_exprs sp = import_('sympy') def _test_chained_multi_native(NativeSys, integrator='cvode', rtol_close=0.02, atol=1e-10, rtol=1e-14, steps_fact=1, **kwargs): logc, logt, reduced = kwargs.pop('logc'), kwargs.pop('logt'), kwargs.pop( 'reduced') zero_time, zero_conc, nonnegative = kwargs.pop('zero_time'), kwargs.pop( 'zero_conc'), kwargs.pop('nonnegative') logexp = (sp.log, sp.exp) ny, nk = 3, 3 k = (.04, 1e4, 3e7) init_conc = (1, zero_conc, zero_conc) tend = 1e11 _yref_1e11 = (0.2083340149701255e-7, 0.8333360770334713e-13, 0.9999999791665050)
# -*- coding: utf-8 -*- import glob import os import subprocess import sys import pytest from pyodesys.util import import_ sym = import_('sym') tests = glob.glob(os.path.join(os.path.dirname(__file__), '../*.py')) @pytest.mark.veryslow @pytest.mark.skipif(sym is None, reason='package sym missing') @pytest.mark.parametrize('pypath', tests) def test_examples(pypath): py_exe = 'python3' if sys.version_info.major == 3 else 'python' p = subprocess.Popen([py_exe, pypath]) assert p.wait() == 0 # SUCCESS==0 py_exe = 'python3' if sys.version_info.major == 3 else 'python' p = subprocess.Popen([py_exe, pypath]) assert p.wait() == 0 # SUCCESS==0