Indent script for clarity
Extract variable for clarity of reading
Rewrite test to remove Windows-specific handling and instead capture the underlying expectation.
Rewrite file operations using context managers.