def foo():
data = call_database()
model = marshal(data)
process(model)
foo
is some callable that glues together other functions. call_database
, marshal
, and process
must be called serially and do not have shared state. Assume the inner functions have acceptable coverage at the unit level.
What is the best practice for testing glue/orchestration code like foo
? This is a simplified example. Imagine there is also exception handling around call_database
or maybe a conditional to validate the data before process
.
It seems wasteful to test every combination again because that should already be covered by the inner functions' unit tests.
Aucun commentaire:
Enregistrer un commentaire