Open log file in context manager (#8659)
Open log file in context manager (#8659)

Co-authored-by: Zachary Kneupper <6bf929442c91b68351d34d08b503032153679e67@Zacharys-MBP.lan>
pytest-dev/pytest,RonnyPfannschmidt/pytest,markshao/pytest,Akasurde/pytest