def test_vcf_writer(self): varscan = open(join(TEST_DATA_DIR, 'vari_filter.vcf')) reader = VCFReader(fhand=varscan) out_fhand = NamedTemporaryFile() writer = VCFWriter(out_fhand, reader) for snv in reader.parse_snvs(): writer.write_snv(snv) writer.flush() assert 'CUUC00027_TC01' in open(out_fhand.name).read() writer.close()