'Close and check the file'

def close_file(self, file_):

    file_.seek(0)
    case = ByteStreamToStreamResult(file_)
    result = StreamToDict(self.handle_dict)
    result.startTestRun()
    case.run(result)
    result.stopTestRun()
    file_.close()
