I have three inter-dependant python functions: f(), g(), and h() such as:
g()depends on the outcome off().h()depends on the outcome ofg().
def f():
...
def g():
f()
...
def h():
g()
...
To unit test these functions I'm using py.test. In the way I'm trying to unit test, I'm observing some redundancy:
def test_f():
assert f()
def test_g():
f()
assert g()
def test_h():
g()
assert h()
How should I design the Unit Tests, in this particular case?
Aucun commentaire:
Enregistrer un commentaire