def test_basic_recordreader_read(self): test_string = "hello world" with self.EphemeralFile('r') as fp: fn = fp.name rr = RecordReader(fp) assert rr.read() is None rr.close() with open(fn, 'w') as fpw: rw = RecordWriter(fpw) rw.write(test_string) with open(fn) as fpr: rr = RecordReader(fpr) assert rr.read() == test_string