Exemple #1
0
    def test_VAR_KEYWORD(self):
        def f(a, b, t, **kwargs):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)
Exemple #2
0
    def test_KEYWORD_ONLY(self):
        def f(a, b, t, *, d=1.):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)
Exemple #3
0
    def test_POSITIONAL_OR_KEYWORD(self):
        def f(a, b, t, c, d=1.):
            pass

        print(_get_args(f))
Exemple #4
0
    def test_VAR_POSITIONAL(self):
        def f(a, b, t, *c, d=1.):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)
Exemple #5
0
        with self.assertRaises(DiffEqError):
            _get_args(f)

    def test_KEYWORD_ONLY(self):
        def f(a, b, t, *, d=1.):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)

    def test_POSITIONAL_ONLY(self):
        def f(a, b, t, /, d=1.):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)

    def test_VAR_KEYWORD(self):
        def f(a, b, t, **kwargs):
            pass

        with self.assertRaises(DiffEqError):
            _get_args(f)


ENa, gNa = 50., 120.
EK, gK = -77., 36.
EL, gL = -54.387, 0.03
C = 1.0