myokit 1.35.4__py3-none-any.whl → 1.36.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- myokit/__init__.py +5 -3
- myokit/__main__.py +9 -159
- myokit/_config.py +2 -2
- myokit/_expressions.py +6 -6
- myokit/_model_api.py +11 -7
- myokit/_myokit_version.py +1 -1
- myokit/_protocol.py +4 -0
- myokit/_sim/__init__.py +1 -0
- myokit/_sim/cvodessim.c +321 -177
- myokit/_sim/cvodessim.py +107 -43
- myokit/_sim/mcl.h +54 -0
- myokit/formats/__init__.py +63 -12
- myokit/formats/ansic/__init__.py +2 -1
- myokit/formats/ansic/_ewriter.py +159 -40
- myokit/formats/cpp/_ewriter.py +12 -1
- myokit/formats/cuda/_ewriter.py +15 -51
- myokit/formats/easyml/_ewriter.py +26 -54
- myokit/formats/heka/_patchmaster.py +15 -3
- myokit/formats/latex/_ewriter.py +103 -88
- myokit/formats/latex/_exporter.py +1 -1
- myokit/formats/mathml/_ewriter.py +2 -2
- myokit/formats/matlab/_ewriter.py +50 -28
- myokit/formats/opencl/_ewriter.py +61 -78
- myokit/formats/python/_ewriter.py +81 -50
- myokit/formats/stan/_ewriter.py +29 -37
- myokit/gui/source.py +1 -1
- myokit/lib/hh.py +3 -0
- myokit/lib/markov.py +6 -0
- myokit/tests/__init__.py +70 -0
- myokit/tests/data/decker.model +59 -59
- myokit/tests/test_formats.py +115 -7
- myokit/tests/test_formats_ansic.py +344 -0
- myokit/tests/test_formats_axon.py +17 -0
- myokit/tests/test_formats_cpp.py +97 -0
- myokit/tests/test_formats_cuda.py +226 -0
- myokit/tests/test_formats_easyml.py +169 -152
- myokit/tests/{test_formats_exporters.py → test_formats_exporters_run.py} +1 -69
- myokit/tests/test_formats_html.py +1 -3
- myokit/tests/test_formats_latex.py +211 -0
- myokit/tests/test_formats_mathml_content.py +13 -0
- myokit/tests/test_formats_mathml_presentation.py +54 -42
- myokit/tests/test_formats_matlab.py +218 -0
- myokit/tests/test_formats_opencl.py +206 -380
- myokit/tests/test_formats_python.py +557 -0
- myokit/tests/test_formats_stan.py +175 -0
- myokit/tests/test_formats_sympy.py +9 -2
- myokit/tests/test_lib_hh.py +36 -0
- myokit/tests/test_lib_plots.py +0 -16
- myokit/tests/test_model.py +21 -1
- myokit/tests/test_simulation_cvodes.py +137 -56
- myokit/tools.py +3 -2
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/LICENSE.txt +1 -1
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/METADATA +19 -8
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/RECORD +57 -52
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/WHEEL +1 -1
- myokit/tests/test_formats_expression_writers.py +0 -1281
- myokit/tests/test_formats_importers.py +0 -53
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/entry_points.txt +0 -0
- {myokit-1.35.4.dist-info → myokit-1.36.1.dist-info}/top_level.txt +0 -0
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
#
|
|
3
|
-
# Tests the importers for various formats
|
|
4
|
-
#
|
|
5
|
-
# This file is part of Myokit.
|
|
6
|
-
# See http://myokit.org for copyright, sharing, and licensing details.
|
|
7
|
-
#
|
|
8
|
-
import os
|
|
9
|
-
import unittest
|
|
10
|
-
|
|
11
|
-
import myokit
|
|
12
|
-
import myokit.formats as formats
|
|
13
|
-
|
|
14
|
-
from myokit.tests import DIR_FORMATS
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class ImporterTest(unittest.TestCase):
|
|
18
|
-
""" Test shared importer functionality. """
|
|
19
|
-
|
|
20
|
-
def test_importer_interface(self):
|
|
21
|
-
# Test listing and creating importers.
|
|
22
|
-
ims = myokit.formats.importers()
|
|
23
|
-
self.assertTrue(len(ims) > 0)
|
|
24
|
-
for i in ims:
|
|
25
|
-
self.assertIsInstance(i, str)
|
|
26
|
-
i = myokit.formats.importer(i)
|
|
27
|
-
self.assertTrue(isinstance(i, myokit.formats.Importer))
|
|
28
|
-
|
|
29
|
-
def test_unknown(self):
|
|
30
|
-
# Test requesting an unknown importer.
|
|
31
|
-
# Test fetching using importer method
|
|
32
|
-
self.assertRaisesRegex(
|
|
33
|
-
KeyError, 'Importer not found', myokit.formats.importer, 'blip')
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class AxonTest(unittest.TestCase):
|
|
37
|
-
""" Partially tests Axon formats importing. """
|
|
38
|
-
|
|
39
|
-
def test_capability_reporting(self):
|
|
40
|
-
# Test if the right capabilities are reported.
|
|
41
|
-
i = formats.importer('abf')
|
|
42
|
-
self.assertFalse(i.supports_component())
|
|
43
|
-
self.assertFalse(i.supports_model())
|
|
44
|
-
self.assertTrue(i.supports_protocol())
|
|
45
|
-
|
|
46
|
-
def test_protocol(self):
|
|
47
|
-
i = formats.importer('abf')
|
|
48
|
-
self.assertTrue(i.supports_protocol())
|
|
49
|
-
i.protocol(os.path.join(DIR_FORMATS, 'abf-v1.abf'))
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if __name__ == '__main__':
|
|
53
|
-
unittest.main()
|
|
File without changes
|
|
File without changes
|