Skip to content

Commit

Permalink
Fix #182 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Jan 26, 2021
1 parent f3738aa commit 72ed483
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cyvcf2/tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,20 @@ def test_add_flag():
w.write_record(rec)
w.close()

v = next(VCF(f))
fh = VCF(f)
v = next(fh)
fh.close()
assert v.INFO["myflag"] is True, dict(v.INFO)

f = tempfile.mktemp(suffix=".vcf")
atexit.register(os.unlink, f)
w = Writer(f, vcf)
rec.INFO["myflag"] = False
w.write_record(rec)
v = next(VCF(f))
w.close()
fh = VCF(f)
v = next(fh)
fh.close()
assert_raises(KeyError, v.INFO.__getitem__, "myflag")


Expand Down

0 comments on commit 72ed483

Please sign in to comment.