I am trying to do a unit test with Pytest on a function of the form
def function(): with open(\'file.txt\', \'r\') as f