# Path: odelab/store.py
# class SimpleStore(object):
# class PyTableStore(SimpleStore):
# 	class AlreadyInitialized(Exception):
# 	class NotInitialized(Exception):
# 	def __init__(self, path=None):
# 	def __getitem__(self, key):
# 	def __setitem__(self, key, value):
# 	def initialize(self, event0, name):
# 	def __len__(self):
# 	def append(self, event):
# 	def open(self, name=None, write=False):
# 	def get_nb_stage(self, events):
# 	def __init__(self, path=None):
# 	def append(self, event):
# 	def getitem(self, events, key):
# 	def __getitem__(self, key):
# 	def setitem(self, events, key, value):
# 	def __setitem__(self, key, value):
# 	def initialize(self, event0, name):
# 	def __len__(self):
# 	def get_nb_stage(self, events):
# 	def open(self, write=False):


from odelab.scheme.rungekutta import *
from odelab.scheme.generallinear import *
from odelab.scheme import *
from odelab.scheme.classic import *
from odelab.scheme.exponential import *
from odelab.store import Store, PyTableStore, SimpleStore
from odelab.system.classic import *
from odelab.system.exponential import *
from odelab import *
import tempfile
import os
import numpy as np
import numpy.testing as npt
import unittest
import pytest
import matplotlib.pyplot as plt
# -*- coding: utf-8 -*-
from __future__ import division







Solver.catch_runtime = False



def f(t,u):
	return t*np.ones_like(u)


class TestMisc(unittest.TestCase):
	def test_solver_autosave(self):
		solver = Solver(ExplicitEuler(h=.1), System(f))
		solver.initialize(u0=1.)
		solver.run(1.)
		self.assertEqual(solver.guess_name(), 'System_ExplicitEuler')


# Path: odelab/store.py
# class SimpleStore(object):
# class PyTableStore(SimpleStore):
# 	class AlreadyInitialized(Exception):
# 	class NotInitialized(Exception):
# 	def __init__(self, path=None):
# 	def __getitem__(self, key):
# 	def __setitem__(self, key, value):
# 	def initialize(self, event0, name):
# 	def __len__(self):
# 	def append(self, event):
# 	def open(self, name=None, write=False):
# 	def get_nb_stage(self, events):
# 	def __init__(self, path=None):
# 	def append(self, event):
# 	def getitem(self, events, key):
# 	def __getitem__(self, key):
# 	def setitem(self, events, key, value):
# 	def __setitem__(self, key, value):
# 	def initialize(self, event0, name):
# 	def __len__(self):
# 	def get_nb_stage(self, events):
# 	def open(self, write=False):


# Path: tests/test_solver.py
from odelab.scheme.rungekutta import *
from odelab.scheme.generallinear import *
from odelab.scheme import *
from odelab.scheme.classic import *
from odelab.scheme.exponential import *
from odelab.store import Store, PyTableStore, SimpleStore
from odelab.system.classic import *
from odelab.system.exponential import *
from odelab import *
import tempfile
import os
import numpy as np
import numpy.testing as npt
import unittest
import pytest
import matplotlib.pyplot as plt

# -*- coding: utf-8 -*-
from __future__ import division







Solver.catch_runtime = False



def f(t,u):
	return t*np.ones_like(u)


class TestMisc(unittest.TestCase):
	def test_solver_autosave(self):
		solver = Solver(ExplicitEuler(h=.1), System(f))
		solver.initialize(u0=1.)
		solver.run(1.)
		self.assertEqual(solver.guess_name(), 'System_ExplicitEuler')


	def test_duration(self):