Verify temporary directory creation and cleanup using pytest tmp_path fixture
Preconditions (2)
Step 1: Use pytest tmp_path fixture to create a temporary directory
Step 2: Inside the test, create a new file named 'testfile.txt' in the temporary directory
Step 3: Write the text 'Hello, pytest!' into the file
Step 4: Read the file content and verify it matches 'Hello, pytest!'
Step 5: After the test finishes, verify that the temporary directory and its contents are deleted automatically
✅ Expected Result: The file 'testfile.txt' is created with correct content during the test, and the temporary directory is removed after test completion