Source code for cis_interface.drivers.tests.test_LPyModelDriver

import unittest
from cis_interface.tests import scripts, assert_raises
from cis_interface.drivers import LPyModelDriver
import cis_interface.drivers.tests.test_ModelDriver as parent


[docs]@unittest.skipIf(LPyModelDriver._lpy_installed, "LPy is installed") def test_LPyModelDriver_nolpy(): # pragma: no lpy r"""Test LPyModelDriver error when LPy not installed.""" assert_raises(RuntimeError, LPyModelDriver.LPyModelDriver, 'test', scripts['lpy'])
[docs]class TestLPyModelParam(parent.TestModelParam): r"""Test parameters for LPyModelDriver class.""" driver = 'LPyModelDriver' def __init__(self, *args, **kwargs): super(TestLPyModelParam, self).__init__(*args, **kwargs) self.args = [scripts['lpy']]
[docs]@unittest.skipIf(not LPyModelDriver._lpy_installed, "LPy is not installed") class TestLPyModelDriverNoStart(TestLPyModelParam, parent.TestModelDriverNoStart): # pragma: lpy r"""Test runner for LPyModelDriver class without starting the driver.""" pass
[docs]@unittest.skipIf(not LPyModelDriver._lpy_installed, "LPy is not installed") class TestLPyModelDriver(TestLPyModelParam, parent.TestModelDriver): # pragma: lpy r"""Test runner for LPyModelDriver class.""" pass