I have in my test module:
import pytest
from src.model_code.central import AgentBasicclass AgentBasicTestee(AgentBasic):pass@pytest.fixture()
def agentBasic():return AgentBasicTestee()@pytest.mark.parametrize('alpha, beta, delta, expected', [(2, 1, 1, pytest.approx(0.5)),(2, 2, 2, pytest.approx(-0.9375 / 0.75)),
])
def test_b3(agentBasic, AgentCOne,alpha, beta, delta, expected):assert(agentBasic.b3(alpha, beta, delta) == expected)
and in my import module
from src.model_code.crra_utility import AgentCrra
AgentCOne = AgentCrraclass AgentBasic:@staticmethod def b3(alpha, beta, delta):"""define matric element b3"""k = AgentCOne.k_bar(alpha, beta, delta)c = AgentCOne.c_bar(alpha, beta, delta)return -c/k
The error message I get is:
> c = AgentCOne.c_bar(alpha, beta, delta)
E TypeError: c_bar() missing 1 required positional argument: 'delta'
Note:
def c_bar(self, alpha, beta, delta):"""non-stochastic steady-state for consumption"""k = self.k_bar(alpha, beta, delta)return k ** alpha - delta * k
So far, self takes one of my parameters s.t. delta stays empty. How can I prevent hat?