Your question is Testing Complex Business Logic. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Write robust unit and integration tests for a complex business logic component.
Implement a deterministic test harness that receives named component fixtures and test cases. Each case must run against the unit component or integration runner, compare the result with the expected value, and record assertion failures or raised exceptions.
Signature: def run_business_logic_tests(component, integration_runner, cases):
component and integration_runner are fixture names such as double or raises. Each case contains input, expected, and optional boolean integration. Return counts for passed and failed cases plus ordered failure details.
def run_business_logic_tests(component, integration_runner, cases):