def METHOD_NAME(self):
    with open(self.fname) as f:
        filedata = f.read()
    cat = read_events(self.fname)
    cat[0].origins[0].arrivals[0].time_weight = None
    with NamedTemporaryFile() as tf:
        tempfile = tf.name
        cat.write(tempfile, 'HYPODDPHA')
        with open(tempfile) as f:
            filedata2 = f.read()
    assert filedata2.replace(' ', '') == filedata.replace(' ', '')