Test resource setup and teardown using pytest fixture with yield
Preconditions (2)
Step 1: Create a fixture named 'resource' that prints 'Setup resource' before yield and 'Teardown resource' after yield
Step 2: Write a test function 'test_example' that uses the 'resource' fixture and asserts True is True
Step 3: Run the test using pytest
✅ Expected Result: The test passes, and the console output shows 'Setup resource' before the test and 'Teardown resource' after the test