A task's logic is plain Python, so test it as plain Python. A TaskFlow task keeps the original function on .function:
from marigold_tasks import total_revenue
def test_total_revenue():
rows = [{"revenue": 100.25}, {"revenue": 50.5}]
assert total_revenue.function(rows) == 150.75
Calling total_revenue(rows) instead would not run the function: outside a Dag it builds a task, not a result. To make this possible, define tasks at module level (or keep the logic in a helper module and make the task a thin wrapper), and pass data in rather than fetching it inside the logic.
Write the inputs by hand, small enough to check in your head, and cover the cases that break code: an empty day, a missing field, one row. A test that only checks "greater than zero" passes on most bugs.
An empty day must not divide by zero.