Capture and verify output printed to stdout and stderr using capfd
Preconditions (2)
Step 1: Write a test function that uses the capfd fixture
Step 2: Call the function that prints to stdout and stderr inside the test
Step 3: Use capfd.readouterr() to capture the output
Step 4: Verify that the captured stdout contains the expected message
Step 5: Verify that the captured stderr contains the expected error message
✅ Expected Result: The test passes if the captured stdout and stderr match the expected messages